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.
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
ES|QL: Improve aggregation over constants handling #112392
base: main
Are you sure you want to change the base?
ES|QL: Improve aggregation over constants handling #112392
Changes from 17 commits
5159109
74129a0
ef3960e
c2db11c
d66004b
aedad55
47db145
4c03ce2
0e8d484
33a8587
636a6e0
0f83b2b
786daa6
5000836
7034814
f27ccd0
c444a61
d6ee3be
020bc9f
178c383
29dd29f
8ab89dc
db2259b
db006d6
1ef3b87
968dcfb
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Out of scope:
stats.csv-spec
has a bunch of...OfConst
tests that overlap a lot with the tests here, except that they normally start withfrom employees
. Because these teststats
more thanrow
, maybe we should move test cases likerow ... | stats ...
from here tostats.csv-spec
in a follow-up PR.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.
This one is converted to null, which I suppose is not expected from a user perspective. Is this something to be fixed later? Is it related with #108215?
Maybe it should have a comment or something here
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.
++ The whole result here looks inconsistent.
I expected
null
since this is consistent with e.g.SUM
andAVG
over 0 rows/rows with onlynull
values.Currently, running the same aggregation on an empty index returns
POINT (NaN NaN)
, which itself is inconsistent with the fact that we shouldn't haveNaN
values in our results - but maybe this consistent with geospatial standards?In any case, the 3 results should be the same. But it's fine to fix this in a follow-up issue. Let's figure out what the result should be and throw this inconsistency into an issue (new or existing).
@craigtaverner , is
POINT(NaN NaN)
really the result we need to return?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.
Per #106025, returning
null
is correct! Thanks @craigtaverner for pointing me to this issue!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.
(More for a follow-up, but): Should we maybe move the aggs on const tests to their own file, like
stats_over_consts.csv-spec
? We may be approaching a number of test cases where it's hard to find out if we have a given test case or not.