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: Lower the implicit limit, if none is user-provided #99816

Merged
merged 3 commits into from Sep 25, 2023

Conversation

bpintea
Copy link
Contributor

@bpintea bpintea commented Sep 22, 2023

This lowers the implicit (max) 10K limit to 500 (default). The new
default limit is only added if no other limit is detected anywhere
in the query (i.e. also before a pipeline breaker, like stats).
Otherwise the capping max limit is applied (as before).

The default limit is made a node setting, like the max results limit.

Closes #99458.

This lowers the implicit (max) 10K limit to 500 (default). The new
default limit is only added if no other limit is detected after the last
pipeline breaker. Otherwise the capping max limit is applied.
If any limit is provided in the query, only apply the max capping.
@bpintea bpintea added :Analytics/ES|QL AKA ESQL ES|QL-ui Impacts ES|QL UI v8.11.0 labels Sep 22, 2023
@elasticsearchmachine elasticsearchmachine added the Team:QL (Deprecated) Meta label for query languages team label Sep 22, 2023
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-ql (Team:QL)

@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/elasticsearch-esql (:Query Languages/ES|QL)

@elasticsearchmachine
Copy link
Collaborator

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

Copy link
Contributor

@astefan astefan left a comment

Choose a reason for hiding this comment

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

LGTM

@bpintea
Copy link
Contributor Author

bpintea commented Sep 22, 2023

@elasticsearchmachine run elasticsearch-ci/part-3

Copy link
Member

@costin costin left a comment

Choose a reason for hiding this comment

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

LGTM. This needs to be clearly documented.

@bpintea
Copy link
Contributor Author

bpintea commented Sep 25, 2023

This needs to be clearly documented.

Opened #99880

@bpintea bpintea merged commit dfec836 into elastic:main Sep 25, 2023
12 checks passed
@bpintea bpintea deleted the esql/add_default_limit branch September 25, 2023 17:13
elasticsearchmachine pushed a commit that referenced this pull request Sep 26, 2023
Document the newly implicit limit of 500 (if no other limit is
provided), as well as the global 10K one.

Related: #99816
piergm pushed a commit to piergm/elasticsearch that referenced this pull request Oct 2, 2023
Document the newly implicit limit of 500 (if no other limit is
provided), as well as the global 10K one.

Related: elastic#99816
elasticsearchmachine pushed a commit that referenced this pull request Oct 18, 2023
Fixes #100555

ESQL [by default](#99816)
adds an implicit `LIMIT 500` to queries that do not define a limit.
Since this can be confusing for the end user, with this PR we also add a
warning to the response, making this default clear and explicit.
luigidellaquila added a commit to luigidellaquila/elasticsearch that referenced this pull request Oct 18, 2023
Fixes elastic#100555

ESQL [by default](elastic#99816)
adds an implicit `LIMIT 500` to queries that do not define a limit.
Since this can be confusing for the end user, with this PR we also add a
warning to the response, making this default clear and explicit.
elasticsearchmachine pushed a commit that referenced this pull request Oct 18, 2023
…1054)

Fixes #100555

ESQL [by default](#99816)
adds an implicit `LIMIT 500` to queries that do not define a limit.
Since this can be confusing for the end user, with this PR we also add a
warning to the response, making this default clear and explicit.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Analytics/ES|QL AKA ESQL >enhancement ES|QL-ui Impacts ES|QL UI Team:QL (Deprecated) Meta label for query languages team v8.11.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ESQL: Improve default limit
4 participants