-
Notifications
You must be signed in to change notification settings - Fork 141
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
Pagination Phase 2: Support ORDER BY
clauses and queries without FROM
.
#1599
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1599 +/- ##
=========================================
Coverage 97.31% 97.31%
- Complexity 4372 4375 +3
=========================================
Files 385 385
Lines 10847 10850 +3
Branches 763 765 +2
=========================================
+ Hits 10556 10559 +3
Misses 284 284
Partials 7 7
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Signed-off-by: Yury-Fridlyand <[email protected]>
547a199
to
1872e00
Compare
LIMIT
, ORDER BY
clauses in pagination and queries without FROM
.ORDER BY
clauses in pagination and queries without FROM
.
Thanks! |
Signed-off-by: Yury-Fridlyand <[email protected]>
ORDER BY
clauses in pagination and queries without FROM
.ORDER BY
clauses and queries without FROM
.
…limit-and-orderby Signed-off-by: Yury-Fridlyand <[email protected]>
@@ -68,14 +67,24 @@ public Boolean visitRelation(Relation node, Object context) { | |||
return Boolean.TRUE; | |||
} | |||
|
|||
private Boolean canPaginate(Node node, Object context) { | |||
protected Boolean canPaginate(Node node, Object context) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had a test which uses (overrides) it, but it become irrelevant after merging with #1500.
The backport to
To backport manually, run these commands in your terminal: # Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-2.x 2.x
# Navigate to the new working tree
cd .worktrees/backport-2.x
# Create a new branch
git switch --create backport/backport-1599-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 94d5479522ba5ae83645c4169d6cc44a38b720de
# Push it to GitHub
git push --set-upstream origin backport/backport-1599-to-2.x
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-2.x Then, create a pull request where the |
Will restart backport after merging #1741 |
…ROM`. (#1599) * Support `ORDER BY` clauses in pagination and queries without `FROM`. Signed-off-by: Yury-Fridlyand <[email protected]> * Fix IT. Signed-off-by: Yury-Fridlyand <[email protected]> --------- Signed-off-by: Yury-Fridlyand <[email protected]> (cherry picked from commit 94d5479)
…ROM`. (#1599) (#1745) * Support `ORDER BY` clauses in pagination and queries without `FROM`. Signed-off-by: Yury-Fridlyand <[email protected]> * Fix IT. Signed-off-by: Yury-Fridlyand <[email protected]> --------- Signed-off-by: Yury-Fridlyand <[email protected]> (cherry picked from commit 94d5479) Co-authored-by: Yury-Fridlyand <[email protected]>
Pagination in V2: Phase 2. See Phase 1 in #1497.
Doc: https://github.com/Bit-Quill/opensearch-project-sql/blob/61767f2b200b2a7f8c8b2df32de209b3c30caa61/docs/dev/Pagination-v2.md
This PR depends on #1500.
You can use attached script for testing as well. Command line:
./cursor_test.sh <table> <page size>
. Requiresjq
. Rename the script before use.cursor_test.sh.txt
Description
Add support for more complex queries in paged requests.
Supported things:
GROUP BY
clauseFROM
clauseUnsupported things:
ORDER BY
- [FEATURE] ImplementpushDownSort
forORDER BY
clause with an expression #1471Issues Resolved
Support of
ORDER BY
clause and support queries withoutFROM
clause.Check List
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.