-
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
Merge OpenSearchPagedIndexScan and OpenSearchIndexScan #1600
Merged
MaxKsyunz
merged 40 commits into
opensearch-project:feature/pagination/integ
from
Bit-Quill:feature/pagination/integ_refactor
May 29, 2023
Merged
Changes from all commits
Commits
Show all changes
40 commits
Select commit
Hold shift + click to select a range
68db706
Remove OpenSearchPagedIndexScan and related classes.
ef93375
Some bug fixes
306a7fe
Updating tests
7d5b126
Updating PaginationWindowIT
dc2c471
Addressing Code Analysis warnings
91cea61
Do not serialize OpenSearchScrollRequest when needClean is true.
2ee810c
Fix checkstyle errors.
39ce902
Complete unit test coverage.
fabd4ee
Code improvements
6eb0498
Checkstyle fixes
bdfe563
Updating expected out in doctest
1f6b6f1
Refactoring
a8295e4
Checkstyle fixes
86429f8
Rename createContinuePaginatedPlan in QueryPlanFactory to create
4f5b69d
Address PR comments.
b1050dd
Address PR comments.
a16f2fa
WIP OpenSearchIndexScan refactor. Unit tests pass.
eff76b2
Refactor OpenSearchIndexScan and OpenSearchRequest.
8548d90
Refactor OpenSearchIndexScan and OpenSearchRequest.
f4770a8
WIP
e350662
Updating imports to reflect changes in opensearch core. (#1645)
413087a
Merge branch 'feature/pagination/integ' into feature/pagination/integ…
7e812e5
Integrating with main.
1daacbb
Merge branch 'feature/pagination/integ' into feature/pagination/integ…
f1e1342
Address refactoring comments WIP
73f18df
Restore error to explain requests containing only a cursor.
60226be
Complete test coverage.
fabb179
Address checkstyle issues.
23bc3ab
Better class name.
264e483
Update design document to reflect refactor.
97ef3a5
Addressed PR feedback.
2cecaca
Addressed PR feedback.
840c4a9
Minor cleanup.
4c9e958
Update core/src/main/java/org/opensearch/sql/planner/logical/LogicalP…
102706b
Update core/src/main/java/org/opensearch/sql/planner/logical/LogicalP…
2f4b48b
Update core/src/main/java/org/opensearch/sql/ast/tree/FetchCursor.java
33ad6dd
Minor cleanup 2
0abe298
Remove assertions that no longer apply
1dc3320
Minor cleanup
701bce7
Update test to account for prior changes
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
32 changes: 32 additions & 0 deletions
32
core/src/main/java/org/opensearch/sql/ast/tree/FetchCursor.java
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/* | ||
* Copyright OpenSearch Contributors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package org.opensearch.sql.ast.tree; | ||
|
||
import lombok.EqualsAndHashCode; | ||
import lombok.Getter; | ||
import lombok.RequiredArgsConstructor; | ||
import org.opensearch.sql.ast.AbstractNodeVisitor; | ||
|
||
/** | ||
* An unresolved plan that represents fetching the next | ||
* batch in paginationed plan. | ||
*/ | ||
@RequiredArgsConstructor | ||
@EqualsAndHashCode(callSuper = false) | ||
public class FetchCursor extends UnresolvedPlan { | ||
Yury-Fridlyand marked this conversation as resolved.
Show resolved
Hide resolved
|
||
@Getter | ||
final String cursor; | ||
|
||
@Override | ||
public <T, C> T accept(AbstractNodeVisitor<T, C> nodeVisitor, C context) { | ||
return nodeVisitor.visitFetchCursor(this, context); | ||
} | ||
|
||
@Override | ||
public UnresolvedPlan attach(UnresolvedPlan child) { | ||
throw new UnsupportedOperationException("Cursor unresolved plan does not support children"); | ||
} | ||
} |
This file contains 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
58 changes: 0 additions & 58 deletions
58
core/src/main/java/org/opensearch/sql/executor/execution/ContinuePaginatedPlan.java
This file was deleted.
Oops, something went wrong.
This file contains 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
This file contains 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
This file contains 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
This file contains 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
38 changes: 38 additions & 0 deletions
38
core/src/main/java/org/opensearch/sql/planner/logical/LogicalFetchCursor.java
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/* | ||
* Copyright OpenSearch Contributors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package org.opensearch.sql.planner.logical; | ||
|
||
import java.util.List; | ||
import lombok.EqualsAndHashCode; | ||
import lombok.Getter; | ||
import lombok.ToString; | ||
import org.opensearch.sql.planner.logical.LogicalPlan; | ||
import org.opensearch.sql.planner.logical.LogicalPlanNodeVisitor; | ||
import org.opensearch.sql.storage.StorageEngine; | ||
|
||
@EqualsAndHashCode(callSuper = false) | ||
@ToString | ||
public class LogicalFetchCursor extends LogicalPlan { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. javadoc? |
||
@Getter | ||
private final String cursor; | ||
|
||
@Getter | ||
private final StorageEngine engine; | ||
|
||
/** | ||
* LogicalCursor constructor. Does not have child plans. | ||
*/ | ||
public LogicalFetchCursor(String cursor, StorageEngine engine) { | ||
super(List.of()); | ||
this.cursor = cursor; | ||
this.engine = engine; | ||
} | ||
|
||
@Override | ||
public <R, C> R accept(LogicalPlanNodeVisitor<R, C> visitor, C context) { | ||
return visitor.visitFetchCursor(this, context); | ||
} | ||
} |
Oops, something went wrong.
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.
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.
nit
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.
lave for later