-
Notifications
You must be signed in to change notification settings - Fork 25.6k
ESQL: Ungrouped agg implementations for FIRST/LAST #132513
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
Conversation
Actually a few things: 1. Add generation for ungroups FIRST/LAST 2. Change the description of FIRST/LAST to be more readable 3. Allow that description to be specified instead of generated 4. Add grouped and ungrouped tests for FIRST/LAST 5. Grouped tests weren't passing with `null` groups. Always enabled group id tracking to fix it. 6. Reworked how grouped aggs trigger group id tracking for all grouped aggs to make them a little more consistent. Relates to elastic#108385
Pinging @elastic/es-analytical-engine (Team:Analytics) |
{ | ||
var properties = [:] | ||
v1.forEach { k, v -> properties["v1_" + k] = v} | ||
v2.forEach { k, v -> properties["v2_" + k] = v} |
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.
I do not understand above. Would we have only a single v1 and v2 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.
I'll add a comment. we only need LongDouble
, LongInt
, LongLong
, and LongFloat
for the implementations we have now. I can drop LongBool
- at least until we add more users.
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. Thanks Nik!
import java.util.Set; | ||
import java.util.stream.IntStream; | ||
|
||
public class FirstLongByTimestampGroupingAggregatorFunctionTests extends GroupingAggregatorFunctionTestCase { |
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.
Thank you for adding these tests :)
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.
It found a bug! A bug that doesn't exist in TSDB, so it can't matter to anyone using it so far!
… esql_first_ungrouped_impl
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!
Thanks for the reviews friends! |
Actually a few things:
null
groups. Always enabled group id tracking to fix it.Relates to #108385