[multistage] Lite Mode with Scatter Gather Execution#16000
[multistage] Lite Mode with Scatter Gather Execution#16000ankitsultana merged 5 commits intoapache:masterfrom
Conversation
| "sql": "SET usePhysicalOptimizer=true; SET useLiteMode=true; SET runInBroker=true; EXPLAIN PLAN FOR WITH tmp AS (SELECT col1, col2, col3, COUNT(*) FROM a WHERE col1 = 'foo' GROUP BY col1, col2, col3 ORDER BY col2) SELECT * FROM tmp LIMIT 100,400", | ||
| "output": [ | ||
| "Execution Plan", | ||
| "\nPhysicalSort(offset=[100], fetch=[400])", |
There was a problem hiding this comment.
Note that unlike other plans, the top-most plan node here is not an exchange. Reason is that the exchange in the sub-tree sends data to the broker directly, and there's no exchange required after that.
If there's a collation trait to be met, that'll be met by adding a sort.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #16000 +/- ##
============================================
+ Coverage 62.90% 63.37% +0.47%
+ Complexity 1386 1357 -29
============================================
Files 2867 2913 +46
Lines 163354 167061 +3707
Branches 24952 25555 +603
============================================
+ Hits 102755 105877 +3122
- Misses 52847 53168 +321
- Partials 7752 8016 +264
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
|
||
| public LiteModeWorkerAssignmentRule(PhysicalPlannerContext context) { | ||
| _context = context; | ||
| _runInBroker = Boolean.parseBoolean(context.getQueryOptions().getOrDefault( |
There was a problem hiding this comment.
Need to move this to QueryOptionUtils. Will update
Summary
Adds the ability in Lite Mode to run all of the non-leaf stages in the broker directly, similar to the the scatter gather design of the V1 engine.
I am also fixing a bug in the Lite Mode where I wasn't honoring the collation traits.
Test Plan
Both of these features are covered by unit-tests. I have done some manual tests with a Quickstart.
E2E tests which also run queries will be added as part of #15958.