-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Add evaluation context to time-series aggregators #126089
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
2d5dcdd
to
ab04dfe
Compare
f0c3c5c
to
80402d9
Compare
80402d9
to
4a301dd
Compare
Pinging @elastic/es-analytical-engine (Team:Analytics) |
Pinging @elastic/es-storage-engine (Team:StorageEngine) |
private final ClassName implementation; | ||
private final List<AggregatorImplementer.IntermediateStateDesc> intermediateState; | ||
private final boolean includeTimestampVector; | ||
private final boolean timseries; |
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.
s/timseries/timeSeries
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.
Looks good, deferring to Nik to approve (my esql-fu is pretty elementary).
* A time-series aggregator might need more than just the DriverContext to evaluate, such as the range interval of each group. | ||
*/ | ||
public class GroupingAggregatorEvaluationContext { | ||
private final DriverContext driverContext; |
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.
NIT: maybe this could be a record
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.
Ah, I made this a class intentionally so that we can extend for TimeSeriesGroupingAggregatorEvaluationContext.
@kkrik-es @idegtiarenko Thanks for reviews. |
Rate aggregators need to access the start time and end time of each group to perform extrapolation in the final evaluation. This change replaces the DriverContext parameter in evaluateFinal with EvaluationContext, allowing the TimeSeriesAggregationOperator to pass an EvaluationContext with these time intervals. I took another approach where the extension is applied only for the time series aggregator, but it could be fragile with the pre-filter of aggregators.