Add rule to wrap bare metrics in default over time function#140090
Merged
felixbarny merged 15 commits intoelastic:mainfrom Jan 11, 2026
Merged
Add rule to wrap bare metrics in default over time function#140090felixbarny merged 15 commits intoelastic:mainfrom
felixbarny merged 15 commits intoelastic:mainfrom
Conversation
kkrik-es
reviewed
Dec 31, 2025
...gin/esql/src/test/java/org/elasticsearch/xpack/esql/optimizer/LogicalPlanOptimizerTests.java
Outdated
Show resolved
Hide resolved
2ffbe44 to
cf6c949
Compare
Collaborator
|
Pinging @elastic/es-storage-engine (Team:StorageEngine) |
This PR is meant to just add the rule without making functional changes.
kkrik-es
reviewed
Jan 9, 2026
Contributor
kkrik-es
left a comment
There was a problem hiding this comment.
Looks good to me, it may be a good idea to have @alex-spies take a look too.
dnhatn
approved these changes
Jan 9, 2026
| } | ||
|
|
||
| public LogicalPlan rule(TimeSeriesAggregate aggregate) { | ||
| List<NamedExpression> newAggregates = aggregate.aggregates().stream().map(agg -> { |
Member
There was a problem hiding this comment.
Should we use transform here? Also, can we avoid changing the aggregate if we are not injecting an over_time aggregation?
dnhatn
approved these changes
Jan 10, 2026
jimczi
pushed a commit
to jimczi/elasticsearch
that referenced
this pull request
Jan 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds an optimizer rule without wiring it that inserts a default inner aggregation. This is a part of #140135 where this rule will get wired.
related to #138702