feat(cubesql): Support FULL and RIGHT joins with non-push-to-Cube SQL push down#11008
Conversation
|
Claude finished @MazterQyou's task in 2m 16s —— View job Code ReviewVerdict: Looks good overall — clean, well-scoped fix. 0 high, 0 medium, 3 low (all suggestions / nits posted inline). Full review (expand)SummaryThe fix is well-scoped: the rewrite already produced a correct plan for FULL/RIGHT joins of two grouped subqueries; the PR just wires SQL generation and join-type templates through. Separation between the push-to-Cube path (refuses FULL/RIGHT) and the non-push-to-Cube path (now supports them) is clearly commented and consistently enforced. What's good
Findings (all low)
Security / performance
Checklist
|
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #11008 +/- ##
==========================================
+ Coverage 79.06% 79.10% +0.04%
==========================================
Files 472 472
Lines 95983 96172 +189
Branches 3524 3524
==========================================
+ Hits 75888 76077 +189
Misses 19580 19580
Partials 515 515
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
5fecb83 to
37109d0
Compare
|
Claude finished @MazterQyou's task in 1m 6s —— View job Code ReviewRe-checked after PR synchronize: no new commits since the prior review (still Verdict: Looks good overall — clean, well-scoped fix. 0 high, 0 medium, 3 low (suggestions only; all already inline on the PR). Prior findings (still apply)
No new high/medium issues introduced. Security and performance unchanged from prior pass. |
… push down Signed-off-by: Alex Qyoun-ae <4062971+MazterQyou@users.noreply.github.com>
Signed-off-by: Alex Qyoun-ae <4062971+MazterQyou@users.noreply.github.com>
37109d0 to
74331ab
Compare
|
Claude finished @MazterQyou's task in 1m 26s —— View job Code ReviewRe-reviewed after Verdict: Looks good. The new commit cleanly addresses my prior Snowflake redundancy concern by splitting the namespaces. 0 high, 0 medium, 0 new low. All 3 prior threads are already resolved. DetailsWhat changed in
|
| # | Path:line | Status |
|---|---|---|
| 1 | join.rs:1068 (template lookup unreachable on push-to-Cube path) |
thread resolved — non-blocking nit |
| 2 | test_wrapper.rs:1249 (RIGHT/negative/push-to-Cube test gaps) |
thread resolved |
| 3 | BaseQuery.js:4669 (base-default FULL/RIGHT exposure) |
thread resolved; partially superseded by namespace split for the Tesseract path |
Check List
Description of Changes Made
This PR fixes a regression introduced by grouped joins with SQL push down (#10234): a FULL OUTER JOIN of two grouped subqueries (e.g. period-over-period cost comparison) now fails with
Unsupported join type for join subquery: Full. The rewrite already produced the correct plan; only SQL generation and the join-type templates were limited to Inner/Left.This adds FULL and RIGHT support for the non-push-to-Cube path (both sides as standalone subqueries, where outer-join semantics map cleanly to SQL). The push-to-Cube path — where the join is folded inside the Cube query with
its own grouping/measures — explicitly keeps refusing FULL/RIGHT, since NULL-extended outer rows there are not validated.
Push down is template-gated: FULL/RIGHT only push down when the target data source declares the
join_types/*template, otherwise the join falls back to DataFusion.The PR also makes Tesseract use separate templates for joins.