Repository navigation
Conversation
Unit tests pass, some integration tests fail. Signed-off-by: MaxKsyunz <[email protected]>
Signed-off-by: MaxKsyunz <[email protected]>
10000 is default query size set in `integ-test/build.gradle` Previous request builder wasn't setting size correctly for explain requests so output didn't match what was executed. Signed-off-by: MaxKsyunz <[email protected]>
Paginated response no longer sends an empty last page. Last page of the response now lacks cursor property. This matches legacy behaviour. Signed-off-by: MaxKsyunz <[email protected]>
Signed-off-by: MaxKsyunz <[email protected]>
When OpenSearchScrollRequest.needClean is true, the object represents the last request. Signed-off-by: MaxKsyunz <[email protected]>
3a9c6e0 to
91cea61
Compare
Signed-off-by: MaxKsyunz <[email protected]>
Codecov Report
@@ Coverage Diff @@
## feature/pagination/integ #1600 +/- ##
==============================================================
- Coverage 98.16% 97.22% -0.94%
- Complexity 3306 4217 +911
==============================================================
Files 287 381 +94
Lines 8174 10596 +2422
Branches 552 727 +175
==============================================================
+ Hits 8024 10302 +2278
- Misses 147 287 +140
- Partials 3 7 +4
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Signed-off-by: MaxKsyunz <[email protected]>
- Rename `getQuerySize` to `getMaxResponseSize` to reflect what the value means. - Create ExecutableRequestBuilder interface -- what OpenSearchIndexScan requires from a request builder. - Remove `PushDownRequestBuilder` interface as unnecessary Signed-off-by: MaxKsyunz <[email protected]>
Signed-off-by: MaxKsyunz <[email protected]>
Refactoring fixed a small bug in explain. Previously, explain output did not show the correct `SearchSourceBuilder.size` value . It now does and this affected some tests. Signed-off-by: MaxKsyunz <[email protected]>
- Inlined `OpenSearchIndexScan.create` that was only used in tests. - Changed Function parameter of `OpenSearchIndexScanBuilder` to an abstract method -- better describes intent. - Renamed PushDownTranslator to PushDownQueryBuilder for better consistency. Signed-off-by: MaxKsyunz <[email protected]>
Signed-off-by: MaxKsyunz <[email protected]>
Old name doesn't quite make sense. Signed-off-by: MaxKsyunz <[email protected]>
|
|
||
| @EqualsAndHashCode(callSuper = false) | ||
| @ToString | ||
| public class LogicalFetchCursor extends LogicalPlan { |
…lanDSL.java Co-authored-by: Yury-Fridlyand <[email protected]> Signed-off-by: Max Ksyunz <[email protected]>
…lanNodeVisitor.java Co-authored-by: Yury-Fridlyand <[email protected]> Signed-off-by: Max Ksyunz <[email protected]>
Co-authored-by: Yury-Fridlyand <[email protected]> Signed-off-by: Max Ksyunz <[email protected]>
Signed-off-by: MaxKsyunz <[email protected]>
acarbonetto
left a comment
There was a problem hiding this comment.
Please respond to Chen/Peng on this:
OpenSearchIndex.java
| relation, tableScanBuilder, write, tableWriteBuilder, filter, aggregation, rename, project, | ||
| remove, eval, sort, dedup, window, rareTopN, highlight, mlCommons, ad, ml, paginate, nested | ||
| remove, eval, sort, dedup, window, rareTopN, highlight, mlCommons, ad, ml, paginate, nested, | ||
| cursor |
There was a problem hiding this comment.
nit: we should split this test up for each LogicalPlan node
There was a problem hiding this comment.
I merged this recently to avoid duplicating code in tests...
| assertEquals( | ||
| project(pagedTableScanBuilder), | ||
| LogicalPlanOptimizer.create().optimize(paginate(project(relation), 4))); | ||
| assertEquals(project(tableScanBuilder), optimized); |
There was a problem hiding this comment.
nit: we should check pagesize of 4 explicitly
or is this done already?
| var builder = new OpenSearchRequestBuilder( | ||
| settings.getSettingValue(Settings.Key.QUERY_SIZE_LIMIT), | ||
| new OpenSearchExprValueFactory(allFields)); | ||
| return new OpenSearchIndexScanBuilder(builder) { |
Signed-off-by: MaxKsyunz <[email protected]>
Add comment and remove unused default constructor. Signed-off-by: MaxKsyunz <[email protected]>
|
Please, update PR description - for example, you don't have |
Yury-Fridlyand
left a comment
There was a problem hiding this comment.
LGFM
Last few minor things left.
Signed-off-by: MaxKsyunz <[email protected]>
High-level Summary
Core Module
PushDownPageSizeoptimization rule toLogicalPlanOptimizer.TableScanBuilder.pushDownPageSizemethod.Table.createPagedScanBuilder.CreatePagingTableScanBuilder.opensearch Module
OpenSearchIndexScanQueryBuilderandOpenSearchIndexScanAggregationBuilderby removing index scan dependency.OpenSearchScrollRequest.toCursordoes not generate a cursor if the request needs to be cleaned up -- means OpenSearch will not send any more data.ExecutableRequestBuilderinterface that represents operations of an executable request. Used byOpenSearchIndexScan.ContinuePageRequestto only implementExecutableRequestBuilder.InitialPageRequestBuilder,OpenSearchPagedIndexScan,OpenSearchPagedIndexScanBuilder,PagedRequestBuilder,PushDownRequestBuilderIssues Resolved
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.