[query] return 0 if there was at least one valid number#2402
Draft
gediminasgu wants to merge 39 commits intomasterfrom
Draft
[query] return 0 if there was at least one valid number#2402gediminasgu wants to merge 39 commits intomasterfrom
gediminasgu wants to merge 39 commits intomasterfrom
Conversation
…' into gg/m3comparator-clear-data
Allows to run queries like {tag="test"}. Previously only querying with metric name like random{tag="test"} was only supported.
…wo-metric-name # Conflicts: # src/cmd/services/m3comparator/main/filterer.go # src/cmd/services/m3comparator/main/main.go # src/cmd/services/m3comparator/main/querier.go # src/cmd/services/m3comparator/main/querier_test.go
# Conflicts: # src/cmd/services/m3comparator/main/series_load_handler.go # src/cmd/services/m3comparator/main/series_load_handler_test.go
…mql-testdata # Conflicts: # src/cmd/services/m3comparator/main/filterer.go # src/cmd/services/m3comparator/main/main.go # src/cmd/services/m3comparator/main/querier.go # src/cmd/services/m3comparator/main/querier_test.go # src/cmd/services/m3comparator/main/series_load_handler.go # src/cmd/services/m3comparator/main/series_load_handler_test.go
…-promql-testdata # Conflicts: # src/cmd/services/m3comparator/main/querier.go # src/cmd/services/m3comparator/main/querier_test.go
…mql-testdata # Conflicts: # src/cmd/services/m3comparator/main/querier.go # src/cmd/services/m3comparator/main/querier_test.go
…mql-testdata # Conflicts: # src/cmd/services/m3comparator/main/querier_test.go
Co-authored-by: Linas Medžiūnas <linasm@users.noreply.github.com>
Co-authored-by: Linas Medžiūnas <linasm@users.noreply.github.com>
Co-authored-by: Linas Medžiūnas <linasm@users.noreply.github.com>
added 6 commits
June 3, 2020 16:06
…sgu/m3 into gg/m3comparator-promql-testdata
added 2 commits
June 11, 2020 17:49
# Conflicts: # src/query/api/v1/handler/prometheus/native/common.go # src/query/test/m3comparator_client.go # src/query/test/m3query_client.go # src/query/test/test.go # src/query/test/testdata/functions.test # src/query/test/testdata/histograms.test # src/query/test/testdata/legacy.test
arnikola
reviewed
Jun 15, 2020
Comment on lines
+445
to
+452
|
|
||
| onlynans := true | ||
| for a := 0; a < length; a++ { | ||
| if !math.IsNaN(vals.ValueAt(a)) { | ||
| onlynans = false | ||
| break | ||
| } | ||
| } |
Collaborator
There was a problem hiding this comment.
Should this return the last non nan value, or explicitly 0 if there are trailing nans?
834e25e to
99f874f
Compare
e130b7e to
3cf877e
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #2402 +/- ##
========================================
- Coverage 71.6% 71.6% -0.1%
========================================
Files 1052 1052
Lines 93053 92934 -119
========================================
- Hits 66702 66601 -101
+ Misses 21891 21887 -4
+ Partials 4460 4446 -14
Flags with carried forward coverage won't be shown. Click here to find out more. Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this PR does / why we need it:
PromQL compatibility fix.
When running instant queries PromQL returns "0" in place of NaN if there was at least one valid number in a range. Otherwise, it returns "NaN". That is the fix for M3 query to behave in the same way.
Special notes for your reviewer:
I'll change base branch to master when depending PR will be merged.
Does this PR introduce a user-facing and/or backwards incompatible change?:
Does this PR require updating code package or user-facing documentation?: