-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Enforce aggs interface #121898
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
Enforce aggs interface #121898
Conversation
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.
That seems good!
57d34e4 to
b9ce9db
Compare
|
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.
![]()
| declarationType, | ||
| // This should be more restrictive and require org.elasticsearch.compute.aggregation.AggregatorState | ||
| requirePrimitiveOrImplements(elements, Types.RELEASABLE), | ||
| requirePrimitiveOrImplements(elements, ClassName.get("org.elasticsearch.compute.aggregation", "AggregatorState")), |
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.
Should we move those to the Types constants class? To follow what we do with other types.
Same with the GroupingAggregatorState one
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.
👍
| declarationType, | ||
| // This should be more restrictive and require org.elasticsearch.compute.aggregation.AggregatorState | ||
| requirePrimitiveOrImplements(elements, Types.RELEASABLE), | ||
| requirePrimitiveOrImplements(elements, ClassName.get("org.elasticsearch.compute.aggregation", "AggregatorState")), |
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.
👍
(cherry picked from commit a57b985)
This updates code generation to require that State implements AggregatorState/GroupingAggregatorState as we rely on their methods in generated code.
All aggs states are not explicitly implement them.