Add support for parameters in LIMIT command#128464
Merged
luigidellaquila merged 5 commits intoelastic:mainfrom May 27, 2025
Merged
Add support for parameters in LIMIT command#128464luigidellaquila merged 5 commits intoelastic:mainfrom
luigidellaquila merged 5 commits intoelastic:mainfrom
Conversation
luigidellaquila
commented
May 26, 2025
| Source source = source(ctx); | ||
| int limit = stringToInt(ctx.INTEGER_LITERAL().getText()); | ||
| return input -> new Limit(source, new Literal(source, limit, DataType.INTEGER), input); | ||
| Object val = expression(ctx.constant()).fold(FoldContext.small() /* TODO remove me */); |
Contributor
Author
There was a problem hiding this comment.
Doing this here for consistency with the previous behavior and to fail fast, but it could be moved to the verification phase
Collaborator
|
Pinging @elastic/es-analytical-engine (Team:Analytics) |
Collaborator
|
Hi @luigidellaquila, I've created a changelog YAML for you. |
idegtiarenko
approved these changes
May 27, 2025
fang-xing-esql
approved these changes
May 27, 2025
Member
fang-xing-esql
left a comment
There was a problem hiding this comment.
LGTM, thank you @luigidellaquila !
…into esql/limit_with_param
luigidellaquila
added a commit
to luigidellaquila/elasticsearch
that referenced
this pull request
May 30, 2025
Contributor
Author
|
Manual backport: #128655 |
elasticsearchmachine
pushed a commit
that referenced
this pull request
May 30, 2025
rylnd
added a commit
to elastic/kibana
that referenced
this pull request
Jun 6, 2025
… creation (#222467) A [recent change](elastic/elasticsearch#128464) to the ES|QL syntax seems to have broken this test, which assumed that the clause `limit 5 true` is a syntax error in ES|QL. Regardless of whether or not that's correct, the test just needs a syntactically-invalid (and non-aggregating) query, which it now has, again. Closes #222182. ### Checklist - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios
kibanamachine
pushed a commit
to kibanamachine/kibana
that referenced
this pull request
Jun 6, 2025
… creation (elastic#222467) A [recent change](elastic/elasticsearch#128464) to the ES|QL syntax seems to have broken this test, which assumed that the clause `limit 5 true` is a syntax error in ES|QL. Regardless of whether or not that's correct, the test just needs a syntactically-invalid (and non-aggregating) query, which it now has, again. Closes elastic#222182. ### Checklist - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios (cherry picked from commit 0fb44f8)
kibanamachine
pushed a commit
to kibanamachine/kibana
that referenced
this pull request
Jun 6, 2025
… creation (elastic#222467) A [recent change](elastic/elasticsearch#128464) to the ES|QL syntax seems to have broken this test, which assumed that the clause `limit 5 true` is a syntax error in ES|QL. Regardless of whether or not that's correct, the test just needs a syntactically-invalid (and non-aggregating) query, which it now has, again. Closes elastic#222182. ### Checklist - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios (cherry picked from commit 0fb44f8)
pmuellr
pushed a commit
to pmuellr/kibana
that referenced
this pull request
Jun 11, 2025
… creation (elastic#222467) A [recent change](elastic/elasticsearch#128464) to the ES|QL syntax seems to have broken this test, which assumed that the clause `limit 5 true` is a syntax error in ES|QL. Regardless of whether or not that's correct, the test just needs a syntactically-invalid (and non-aggregating) query, which it now has, again. Closes elastic#222182. ### Checklist - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios
nickpeihl
pushed a commit
to nickpeihl/kibana
that referenced
this pull request
Jun 12, 2025
… creation (elastic#222467) A [recent change](elastic/elasticsearch#128464) to the ES|QL syntax seems to have broken this test, which assumed that the clause `limit 5 true` is a syntax error in ES|QL. Regardless of whether or not that's correct, the test just needs a syntactically-invalid (and non-aggregating) query, which it now has, again. Closes elastic#222182. ### Checklist - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios
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.
Adding support for positional and named parameters in LIMIT command, eg.