Skip to content
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

ESQL: only 400 response on IllegalArgumentException in the compute engine #126198

Closed
alex-spies opened this issue Apr 3, 2025 · 1 comment · Fixed by #126296
Closed

ESQL: only 400 response on IllegalArgumentException in the compute engine #126198

alex-spies opened this issue Apr 3, 2025 · 1 comment · Fixed by #126296
Assignees
Labels
:Analytics/ES|QL AKA ESQL >bug Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo)

Comments

@alex-spies
Copy link
Contributor

alex-spies commented Apr 3, 2025

To reproduce: Check out main before #125764 was merged. Run a local ES instance via ./gradlew run and ingest the csv test data:

./gradlew :x-pack:plugin:esql:qa:testFixtures:loadCsvSpecData --args="http://elastic-admin:elastic-password@localhost:9200"

Run the following query (until it errors, it's slightly non-deterministic):

from *    
| enrich languages_policy on author.keyword
| sort book_no
| limit 1

This gives a 400 when it errors. Running with error_trace shows that it's due to a mismatch in data types (originally from a wrong layout):

 Expected [BYTES_REF] but was [INT]
...
Caused by: java.lang.IllegalArgumentException: Expected [BYTES_REF] but was [INT]
  \tat org.elasticsearch.compute.operator.topn.ValueExtractor.extractorFor(ValueExtractor.java:30)
  \tat org.elasticsearch.compute.operator.topn.TopNOperator$RowFiller.<init>(TopNOperator.java:150)
  \tat org.elasticsearch.compute.operator.topn.TopNOperator.addInput(TopNOperator.java:371)
  \tat org.elasticsearch.compute.operator.Driver.runSingleLoopIteration(Driver.java:276)
...

I believe this IAE should've triggered a 500 response; returning 400 can obscure a bug in the compute engine.

@elasticsearchmachine elasticsearchmachine added the Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) label Apr 3, 2025
@elasticsearchmachine
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Analytics/ES|QL AKA ESQL >bug Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants