[Analytics Engine] Wire broadcast join end-to-end via DataFusion backend - #21677
[Analytics Engine] Wire broadcast join end-to-end via DataFusion backend#21677LantaoJin wants to merge 17 commits into
Conversation
…or-centric join is wired Signed-off-by: Lantao Jin <ltjin@amazon.com>
…taFusion backend) Signed-off-by: Lantao Jin <ltjin@amazon.com>
Signed-off-by: Lantao Jin <ltjin@amazon.com>
PR Code Analyzer ❗AI-powered 'Code-Diff-Analyzer' found issues on commit f468ae4.
The table above displays the top 10 most important findings. Pull Requests Author(s): Please update your Pull Request according to the report above. Repository Maintainer(s): You can Thanks. |
Signed-off-by: Lantao Jin <ltjin@amazon.com>
|
Real bug: fixed False alarm: no action |
Signed-off-by: Lantao Jin <ltjin@amazon.com>
PR Code Suggestions ✨Latest suggestions up to 11e4c7a Explore these optional code suggestions:
Previous suggestionsSuggestions up to commit 568a099
Suggestions up to commit 8178ef0
Suggestions up to commit ece1d02
Suggestions up to commit 183897c
|
|
BTW, here is the new configurations added. Any thoughts? @mch2
|
Signed-off-by: Lantao Jin <ltjin@amazon.com>
|
❌ Gradle check result for ece1d02: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
Signed-off-by: Lantao Jin <ltjin@amazon.com>
Signed-off-by: Lantao Jin <ltjin@amazon.com>
Signed-off-by: Lantao Jin <ltjin@amazon.com>
Signed-off-by: Lantao Jin <ltjin@amazon.com>
|
❌ Gradle check result for 8178ef0: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
Signed-off-by: Lantao Jin <ltjin@amazon.com>
…hared executor flag Signed-off-by: Lantao Jin <ltjin@amazon.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #21677 +/- ##
============================================
- Coverage 73.46% 73.45% -0.02%
- Complexity 74825 74835 +10
============================================
Files 5997 6005 +8
Lines 339688 339767 +79
Branches 48961 48969 +8
============================================
+ Hits 249558 249560 +2
- Misses 70272 70371 +99
+ Partials 19858 19836 -22 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Signed-off-by: Lantao Jin <ltjin@amazon.com>
|
❌ Gradle check result for 11e4c7a: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
|
The CI failures not related, it introduced by #21703 which removed the |
|
the previous CI passed, please take a review @mch2 @sandeshkr419 |
|
@mch2 as discussed offline. I will continue developing the M2 and further works in my branch https://github.com/LantaoJin/OpenSearch/tree/feature/scaffold_mpp_stype_join. Close this PR and reopen later. |
Description
Lands the production path for broadcast-join (milestone 1) execution on the DataFusion backend on top
of PR #21639 (distributed join planning). The
JoinStrategyAdvisoralready pickedBROADCASTwhen one join side fit inside the broadcast gates, butDefaultPlanExecutorfell back to coordinator-centric.This PR replaces that fallback with a two-pass dispatcher that:
BROADCAST_BUILDchild stage against a newBroadcastCaptureSinkthat buffers its Arrow batches into a single Arrow-IPC byte buffer.BroadcastInjectionInstructionNodecarrying the IPC bytes to every probe-stage plan alternative, then dispatches through the normalQuerySchedulerpath. Each probe data node decodes the payload, registers it as aMemTableunder"broadcast-<buildStageId>"on its shard-scanSessionContextHandle, and the native engine executesJoin(ShardScan, NamedScan("broadcast-<buildStageId>")).Scope: The join runs on each probe data node in parallel, against its local shards plus the injected memtable. The coordinator only gathers joined rows -- there is no coord-side join in this M1 path.
End-to-end verified.
BroadcastJoinITruns INNER and LEFT OUTER broadcast joins on a 2-node cluster against parquet-backed indices and asserts row-multiset parity with the coord-centric baseline plus a strategy-counter delta proving BROADCAST actually fired.PR#21639 landed a Volcano split-rule architecture that changed planner-shape contracts our
M0 work was built on. This PR rebases on top of it and reconciles:
M0/M1 <--> PR#21639 reconciliation
OpenSearchHashJoinRuleremoved. M0's HASH-shuffle Volcano rule was incompatible with PR#21639's split-rule design — registering it caused a memo explosion (verified empirically:PlanShapeTests.testJoinThenSort_2shardhit a 16-minute suite timeout before this fix). M2 hash-shuffle support needs to be redesigned as a sibling split rule. Tracked as a follow-up.ExchangeInforeverted to PR#21639's 2-field shape. M0 addedpartitionCountfor the M2 hash-shuffle work; auto-generated recordtoStringmismatch broke ~11 PR#21639-introduced*PlanShapeTests. The field comes back when M2 hash-shuffle lands.OpenSearchJoinSEMI/ANTI fix preserved. M0 patchedgetOutputFieldStorage()to return left-only storage forSEMI/ANTI; PR#21639's reset of the file dropped that. Re-applied (if (getJoinType().projectsRight())).CapabilityRegistryjoin indexing removed. M0's per-format Equi/Theta indexing was built on the M0JoinCapabilityAPI; PR#21639 replaced that API with a simplerrecord JoinCapability(Set<JoinKind>, Set<String>). The indexing was dead code under the new API.shardCount=1; under PR#21639's split rule, single-shard same-table joins go SHARD-local (no ERs, no separate child stages). Switched fixtures toshardCount=2or3so they exercise the COORDINATOR-localized path they were designed for.!info.isEqui()→ unmarkedLogicalJoinsurvives, Volcano's trait converter crashes). The M0/M1 tests that asserted "theta routes coord-centric" now useexpectThrows(RuntimeException.class, ...)to pin the failure mode. M2 follow-up: re-enable theta joins through a coord-centric fallback consistent with the new split-rule architecture.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.