-
Notifications
You must be signed in to change notification settings - Fork 25.5k
Add dimension values for time-series #136052
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
67c70b8
to
5cfd4d1
Compare
Pinging @elastic/es-analytical-engine (Team:Analytics) |
return this; | ||
} else { | ||
// fallback to VALUES | ||
return new Values(source(), field(), filter()); |
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 is where we fallback dimension_values to values.
Nik understands the bwc part better, can comment on that. |
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.
Hey, can we wait just a little bit until #131108 is done? (Currently being worked on.)
This PR introduces an alternative approach to plan versioning, namely on the level of individual expressions, and we're just moving towards a world where the planner as a whole is aware of the minimum transport version. Additionally, it means that we effectively send different query plans to different nodes (and the VersionedExpression interface paves the way for more of that), which I expect will complicate the evolution of the analyzer/planner going forward.
After #131108, we won't have to make PlanStreamOutput
aware of versioned named writeables, because, instead, we will be able to pass in the min transport version into TranslateTimeSeriesAggregate
so that this can either create Values
or DimensionValues
instances depending on the min version that's supported.
We optimized the VALUES aggregation for time-series queries rather than introducing a specialized version for dimension fields, and the VALUES execution disappeared from the profiler. However, the VALUES aggregation reappeared during recent testing with multi-valued dimension fields. Therefore, this change introduces dimension_values for this purpose.
To support BWC, I need to introduce VersionedExpression, which falls back to Values if the peer node or cluster does not have DimensionValues. I am open to moving this change to VersionedNamedWriteable, but I have opted to limit the scope to ES|QL for now.