analytics-engine: add distributed join planning and execution - #21639
Conversation
PR Code Suggestions ✨Latest suggestions up to b01917a Explore these optional code suggestions:
Previous suggestionsSuggestions up to commit 2575a64
Suggestions up to commit 835c59a
Suggestions up to commit a5fac52
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #21639 +/- ##
============================================
- Coverage 73.49% 73.45% -0.04%
+ Complexity 74624 74570 -54
============================================
Files 5980 5980
Lines 338825 338825
Branches 48857 48857
============================================
- Hits 249010 248889 -121
- Misses 70041 70093 +52
- Partials 19774 19843 +69 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@expani Thanks for the review - i've swapped this to be pure CBO, no hardcoded HEP wrapping - covers single shard case and multi nicely with two traits. Still polishing a few things and will open back up |
PR Reviewer Guide 🔍(Review updated until commit b01917a)Here are some key observations to aid the review process:
|
|
Persistent review updated to latest commit 35703cb |
|
Persistent review updated to latest commit 835c59a |
Add OpenSearchJoin and OpenSearchUnion with cost-based exchange insertion. Join/Union markers no longer wrap inputs at HEP time; Volcano's per-operator cost gate (SINGLETON inputs required) drives OpenSearchExchangeReducer insertion via the distribution TraitDef. Split rules emit a COORDINATOR gather alternative and, when inputs co-locate (same tableId, single shard), a SHARD-local alternative — Volcano picks the cheaper plan. OpenSearchDistribution gains a Locality dimension (SHARD vs COORDINATOR) plus tableId/shardCount carried on SHARD. DAGBuilder recurses into nested ER fragments so each side of a Join becomes its own child stage; Stage reads ExchangeInfo directly off the ER. Join supports INNER/LEFT/RIGHT/FULL/SEMI/ANTI equi-joins plus cross. JoinCapability SPI lets backends declare supported kinds. Union mirrors the Join pattern. FragmentConvertor.attachJoinFragment removed — Join now flows through the same multi-input conversion path as Union. Signed-off-by: Marc Handalian <marc.handalian@gmail.com>
|
Persistent review updated to latest commit 2575a64 |
Signed-off-by: Marc Handalian <marc.handalian@gmail.com>
|
Persistent review updated to latest commit b01917a |
LantaoJin
left a comment
There was a problem hiding this comment.
Basically LGTM, broadcast join (M1) was done in local and I will submit in tomorrow after merging and rebasing with this PR.
Signed-off-by: Lantao Jin <ltjin@amazon.com>
Description
Adds distributed planning and execution for Join and Union in the analytics engine. Multi-input shapes now plan through Volcano's cost model — OpenSearchExchangeReducer (ER) insertion is no longer hand-rolled at HEP marking time.
How ER insertion works now
- COORDINATOR-local alternative: gather both sides to coord (always valid).
- SHARD-local alternative: when inputs co-locate (same tableId, single shard), keep the operator shard-local with no gather — strictly cheaper, so Volcano picks it.
Related Issues
Resolves #[Issue number to be closed when this PR is merged]
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.