Skip to content

Conversation

@MaxKsyunz
Copy link
Collaborator

This updates accounts for the following:

  1. Merge of OpenSearchIndexScan and OpenSearchPagedIndexScan, related builder classes and changes to logical plan optimization.
  2. Removal of ContinuePaginatedPlan and how initial and subsequent paged requests are expressed in logical query plan.
  3. Changes to OpenSearchIndexScan and OpenSearchScrollRequest necessary to support pagination.

@codecov
Copy link

codecov bot commented May 19, 2023

Codecov Report

Merging #1644 (5daad43) into feature/pagination/integ (8e624a5) will not change coverage.
The diff coverage is n/a.

@@                     Coverage Diff                     @@
##             feature/pagination/integ    #1644   +/-   ##
===========================================================
  Coverage                       97.23%   97.23%           
  Complexity                       4233     4233           
===========================================================
  Files                             387      387           
  Lines                           10628    10628           
  Branches                          721      721           
===========================================================
  Hits                            10334    10334           
  Misses                            287      287           
  Partials                            7        7           
Flag Coverage Δ
sql-engine 97.23% <ø> (ø)

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

Copy link
Collaborator

@acarbonetto acarbonetto left a comment

Choose a reason for hiding this comment

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

LGTM - some minor comments/typos


# Scope
Currenty, V2 engine supports pagination only for simple `SELECT * FROM <table>` queries without any other clauses like `WHERE` or `ORDER BY`.
At this time, V2 engine supports pagination only for simple `SELECT * FROM <table>` queries without any other clauses like `WHERE` or `ORDER BY`.
Copy link
Collaborator

Choose a reason for hiding this comment

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

I feel like we're going to have update this line of the design each time we push a PR.
Maybe describe what the scope of this document contains. They will have to look at release notes and read issues to know what has actually been pushed to repo.

1. Execute paginated physical plan.
4. in OpenSearch data source:
1. Support pagination push down.
2. Support other push down optimizations with pagination.
Copy link
Collaborator

Choose a reason for hiding this comment

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

What about de-serialization and creating the cursor for the next requests?


### Query Plan Changes

All three kinds of requests &mdash; non-paged, initial page, or subsequent page &mdash; are processed in the same way. Simplified workflow of query plan processing is shown below for reference.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
All three kinds of requests &mdash; non-paged, initial page, or subsequent page &mdash; are processed in the same way. Simplified workflow of query plan processing is shown below for reference.
All three kinds of requests &mdash; non-paged, initial page, or subsequent page &mdash; are processed at a high-level in the same way. Simplified workflow of query plan processing is shown below for reference.

Copy link
Collaborator

Choose a reason for hiding this comment

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

We want to say that all the requests go through the same high-level steps, although the details/execution of each step may differ.

participant ResourceMonitorPlan
participant OpenSearchPagedIndexScan
participant OpenSearchIndexScan
participant OpenSearchScrollRequest
Copy link
Collaborator

Choose a reason for hiding this comment

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

a duplicate?

Suggested change
participant OpenSearchScrollRequest

Co-authored-by: Andrew Carbonetto <[email protected]>
Signed-off-by: Max Ksyunz <[email protected]>
Signed-off-by: MaxKsyunz <[email protected]>
@MaxKsyunz MaxKsyunz merged commit d30d44c into opensearch-project:feature/pagination/integ May 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants