-
Notifications
You must be signed in to change notification settings - Fork 25.4k
ESQL: Check a few toStrings for aggs #132700
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
base: main
Are you sure you want to change the base?
Conversation
Adds `toString` checking for aggregators to the generic aggs test cases so we can make sure they spit out sensible looking results. We have this for scalar functions but it isn't plugged in for aggs and I noticed it while working on elastic#132603 where I stuck `asdf` for the toString thinking I'd fix it when the test failed. It didn't. There's to many changes to grab this in one go so I've made a hook that tests can opt into. We'll drop the hook once everything has opted into it.
Pinging @elastic/es-analytical-engine (Team:Analytics) |
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. Maybe we should make an issue to remove the optIn flag
@@ -187,6 +190,7 @@ private void aggregateGroupingSingleMode(Expression expression) { | |||
assumeFalse("Grouping aggregations must receive data to check results", pages.isEmpty()); | |||
|
|||
try (var aggregator = groupingAggregator(expression, initialInputChannels(), AggregatorMode.SINGLE)) { | |||
assertAggregatorToString(aggregator); |
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.
Can we move these be their own tests, like in the scalars?
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.
Probably should. I'll do that before merging.
Adds
toString
checking for aggregators to the generic aggs test cases so we can make sure they spit out sensible looking results. We have this for scalar functions but it isn't plugged in for aggs and I noticed it while working on #132603 where I stuckasdf
for the toString thinking I'd fix it when the test failed. It didn't.There's to many changes to grab this in one go so I've made a hook that tests can opt into. We'll drop the hook once everything has opted into it.