-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix incorrect results returned by min
, max
and avg
#145
Fix incorrect results returned by min
, max
and avg
#145
Conversation
… on null/missing values. Signed-off-by: Yury-Fridlyand <[email protected]>
Signed-off-by: Yury-Fridlyand <[email protected]>
Signed-off-by: Yury-Fridlyand <[email protected]>
This comment was marked as abuse.
This comment was marked as abuse.
"format": "yyyy-MM-dd" | ||
}, | ||
"time" : { | ||
"type" : "date", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😆
What the MySQL result for sum(null)? Is it supposed to be null or zero? |
@@ -0,0 +1,18 @@ | |||
{"index":{}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you don't want to give these index numbers?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They are assigned automatically if not given.
{"index":{}} | ||
{"key" : "values", "int" : 42, "dbl" : 3.1415, "bool" : true, "str" : "pewpew", "date" : "1984-05-22", "time" : "22:13:37", "datetime" : "1984-05-22 22:13:37", "timestamp" : "2000-01-02 03:04:05" } | ||
{"index":{}} | ||
{"key" : "missing"} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this not confusing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
key
is not a PK. Just a column.
{"index":{}} | ||
{"key" : "missing"} | ||
{"index":{}} | ||
{"key" : "null", "int" : null, "dbl" : null, "bool" : null, "str" : null, "date" : null, "time" : null, "datetime" : null, "timestamp" : null} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is "key": "null"
also not confusing?
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Signed-off-by: Yury-Fridlyand <[email protected]>
Fix incorrect results returned by
min
,max
andavg
when processing null/missing values only.Signed-off-by: Yury-Fridlyand [email protected]
Description
Before
After
Fixed:
min
max
avg
Not fixed:
sum
This requires much more changes.
Not affected
var_samp
var_pop
stddev_samp
stddev_pop
Issues Resolved
opensearch-project#817
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.