Skip to content

[9.0] ESQL: Fix inconsistent column order in MV_EXPAND (#129745) #131428

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

Merged
merged 2 commits into from
Jul 17, 2025

Conversation

alex-spies
Copy link
Contributor

@alex-spies alex-spies commented Jul 17, 2025

This will backport the following commits from main to 9.0:

The new attribute generated by MV_EXPAND should remain in the original position. The projection added by ProjectAwayColumns does not respect the original order of attributes.

Make ProjectAwayColumns respect the order of attributes to fix this.

(cherry picked from commit ac0c508)

# Conflicts:
#	x-pack/plugin/esql/qa/server/src/main/java/org/elasticsearch/xpack/esql/qa/rest/generative/GenerativeRestTest.java
#	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/optimizer/rules/physical/ProjectAwayColumns.java
#	x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/optimizer/PhysicalPlanOptimizerTests.java
@alex-spies alex-spies added >bug external-contributor Pull request authored by a developer outside the Elasticsearch team auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) :Analytics/ES|QL AKA ESQL labels Jul 17, 2025
Builder is only available on main/9.x, so we have to correctly use the
immutable AttributeSets directly.
@elasticsearchmachine elasticsearchmachine merged commit bb03beb into elastic:9.0 Jul 17, 2025
19 checks passed
@alex-spies alex-spies deleted the backport/9.0/pr-129745 branch July 17, 2025 13:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Analytics/ES|QL AKA ESQL auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) backport >bug external-contributor Pull request authored by a developer outside the Elasticsearch team v9.0.5
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants