[9.3] ESQL: Skip nullifying aliases for Aggregate groups (#141340)#144097
Merged
elasticsearchmachine merged 10 commits intoelastic:9.3from Mar 13, 2026
Merged
[9.3] ESQL: Skip nullifying aliases for Aggregate groups (#141340)#144097elasticsearchmachine merged 10 commits intoelastic:9.3from
elasticsearchmachine merged 10 commits intoelastic:9.3from
Conversation
* Fix injected attributes's IDs on UnionAll branches * Skip nullifying of aliases for Aggregate groups * Fix LookupJoin getting Evals inserted on the right-hand side * Log skipped spec tests if capabilities were missing * Add minimal TS spec tests for nullify * Add reproducer test for join issue * Add spec test: STATS BY missing with FROM --------- Co-authored-by: Alexander Spies <alexander.spies@elastic.co> Co-authored-by: Ievgen Degtiarenko <ievgen.degtiarenko@elastic.co> Co-authored-by: elasticsearchmachine <infra-root+elasticsearchmachine@elastic.co> (cherry picked from commit f7b87e3) # Conflicts: # muted-tests.yml # x-pack/plugin/esql/qa/testFixtures/src/main/resources/unmapped-nullify.csv-spec # x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/action/EsqlCapabilities.java # x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/analysis/Analyzer.java # x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/analysis/rules/ResolveUnmapped.java # x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/analysis/AnalyzerUnmappedTests.java
alex-spies
commented
Mar 12, 2026
Comment on lines
+237
to
+253
| @SuppressWarnings("unchecked") | ||
| public T transformDownSkipBranch(BiFunction<? super T, Holder<Boolean>, ? extends T> rule) { | ||
| Holder<Boolean> skipBranch = new Holder<>(Boolean.FALSE); | ||
| return transformDownSkipBranch(skipBranch, rule); | ||
| } | ||
|
|
||
| @SuppressWarnings("unchecked") | ||
| T transformDownSkipBranch(Holder<Boolean> skipBranch, BiFunction<? super T, Holder<Boolean>, ? extends T> rule) { | ||
| T root = rule.apply((T) this, skipBranch); | ||
| Node<T> node = this.equals(root) ? this : root; | ||
| if (skipBranch.get()) { | ||
| skipBranch.set(false); | ||
| return (T) node; | ||
| } | ||
| return node.transformChildren(child -> child.transformDownSkipBranch(skipBranch, rule)); | ||
| } | ||
|
|
Contributor
Author
There was a problem hiding this comment.
Already exists on main, introduced in #140090
tsImplicitTimestampSortBasicWithMissing cannot run on 9.3 because it requires the ts_implicit_timestamp_sort capability.
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.
Backport
This will backport the following commits from
mainto9.3: