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

Add new setting to ignore pagination where it is unsupported in V2. #1997

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

Conversation

Yury-Fridlyand
Copy link
Collaborator

Description

Changes how pagination requests with unsupported/incompatible [with pagination] queries are handled.
Adds new setting plugins.query.ignore_unsupported_pagination:

  1. true by default
  2. when true such requests are performed without pagination
  3. when false such requests fall back to legacy engine

Misc changes:

  1. Minor logging improvements
  2. Minor doc grooming
  3. Use pagination in correctness test

Please see team review and discussion in Bit-Quill#318.

The new parameter can be configured by

curl -X PUT localhost:9200/_cluster/settings?pretty -H "Content-Type: application/json" -d '{ "transient": { "plugins.query.ignore_unsupported_pagination": true } }'

Issues Resolved

Fixes #1765, #78

Check List

  • New functionality includes testing.
    • All tests pass, including unit test, integration test and doctest
  • New functionality has been documented.
    • New functionality has javadoc added
    • New functionality has user manual doc added
  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

…318)

* Add new setting to ignore pagination where it is unsupported in V2.

Signed-off-by: Yury-Fridlyand <[email protected]>

* Use pagination in correctess tests too.

Signed-off-by: Yury-Fridlyand <[email protected]>

* spotless

Signed-off-by: Yury-Fridlyand <[email protected]>

* Fix tests.

Signed-off-by: Yury-Fridlyand <[email protected]>

---------

Signed-off-by: Yury-Fridlyand <[email protected]>
Signed-off-by: Yury-Fridlyand <[email protected]>
@codecov
Copy link

codecov bot commented Aug 18, 2023

Codecov Report

Merging #1997 (35a13e5) into main (6055c7e) will increase coverage by 0.00%.
Report is 1 commits behind head on main.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##               main    #1997   +/-   ##
=========================================
  Coverage     97.30%   97.30%           
- Complexity     4622     4623    +1     
=========================================
  Files           407      407           
  Lines         11934    11946   +12     
  Branches        827      828    +1     
=========================================
+ Hits          11612    11624   +12     
  Misses          315      315           
  Partials          7        7           
Flag Coverage Δ
sql-engine 97.30% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Changed Coverage Δ
...earch/sql/executor/execution/QueryPlanFactory.java 100.00% <100.00%> (ø)
...rch/sql/opensearch/setting/OpenSearchSettings.java 100.00% <100.00%> (ø)
.../org/opensearch/sql/sql/antlr/SQLSyntaxParser.java 100.00% <100.00%> (ø)

Signed-off-by: Yury-Fridlyand <[email protected]>
…/opensearch-project-sql into integ-ignore-pagination-switch

Signed-off-by: Yury-Fridlyand <[email protected]>
Signed-off-by: Yury-Fridlyand <[email protected]>
Signed-off-by: Yury-Fridlyand <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEATURE] New setting which defines what to do with unsupported pagination requests
3 participants