Skip to content

ESQL: Consider inlinestats when having field_caps check for field names #127564

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

Open
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

astefan
Copy link
Contributor

@astefan astefan commented Apr 30, 2025

The aggregate inside an inlinestats is "interfering" with the way field names are collected for field_caps requests. This made simple queries like from test | inlinestats max(whatever) by group to not return all fields from test, but to limit the resulting columns to whatever and group. inlinestats' purpose is to add columns to an already existent set of columns, which implies that this command has to be "transparent" to any wider collection of field names.

Fixes #127236

@astefan astefan requested a review from alex-spies April 30, 2025 12:53
@elasticsearchmachine elasticsearchmachine added the Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) label Apr 30, 2025
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-analytical-engine (Team:Analytics)

@elasticsearchmachine
Copy link
Collaborator

Hi @astefan, I've created a changelog YAML for you.

@@ -360,14 +362,14 @@ FROM airports
| LIMIT 3
;

abbrev:keyword | city:keyword | region:text | "COUNT(*)":long
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unrelated to this PR, but to previous work.

@@ -127,7 +127,7 @@ protected void shouldSkipTest(String testName) throws IOException {
assumeFalse("INLINESTATS not yet supported in CCS", testCase.requiredCapabilities.contains(INLINESTATS.capabilityName()));
assumeFalse("INLINESTATS not yet supported in CCS", testCase.requiredCapabilities.contains(INLINESTATS_V2.capabilityName()));
assumeFalse("INLINESTATS not yet supported in CCS", testCase.requiredCapabilities.contains(JOIN_PLANNING_V1.capabilityName()));
assumeFalse("INLINESTATS not yet supported in CCS", testCase.requiredCapabilities.contains(INLINESTATS_V5.capabilityName()));
assumeFalse("INLINESTATS not yet supported in CCS", testCase.requiredCapabilities.contains(INLINESTATS_V7.capabilityName()));
Copy link
Contributor Author

@astefan astefan Apr 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

V7 because I am trying to work on multiple separate issues. V6 should come from #127383

@astefan astefan added auto-backport Automatically create backport pull requests when merged >bug and removed >enhancement labels Apr 30, 2025
@elasticsearchmachine
Copy link
Collaborator

Hi @astefan, I've updated the changelog YAML for you.

@elasticsearchmachine
Copy link
Collaborator

Hi @astefan, I've updated the changelog YAML for you.

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-backport Automatically create backport pull requests when merged >bug Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) v9.0.2 v9.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ESQL: columns lost with simple INLINESTATS query. EsqlSession.fieldNames test coverage needed
2 participants