fix(cubesql): Keep distinct count pushdown grouped - #11737
Conversation
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
|
Claude finished @MazterQyou's task in 3m 54s —— View job Review: looks correct, ships the right fix — 1 medium (guard broader than documented), 3 low (comment volume). No blockers.Full review
SummaryThe fix is well targeted. The root cause is real and clearly diagnosed: without a wrapper rule for the Details that check out:
Findings
Nits (not worth a thread)
Not verifiedI did not build or run the Rust tests — there's no |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #11737 +/- ##
===========================================
+ Coverage 59.08% 84.67% +25.58%
===========================================
Files 237 261 +24
Lines 19022 86332 +67310
Branches 3865 0 -3865
===========================================
+ Hits 11239 73098 +61859
- Misses 7222 13234 +6012
+ Partials 561 0 -561
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:
|
Signed-off-by: Alex Qyoun-ae <4062971+MazterQyou@users.noreply.github.com>
4eb2ae8 to
2c0775f
Compare
|
Claude finished @MazterQyou's task in 1m 42s —— View job Re-review after push: all four prior threads addressed, no new findings. Approve-equivalent (I can't formally approve).Full review
What changed since the last roundThe four threads I opened were all acted on, so I've resolved them:
The earlier nit about Verification of the new testFixture members check out against
Remaining, not pressingThe split-rule comment is still 17 lines including the ASCII result table. The table is illustrative rather than load-bearing — the sentence above it already says a NULL-holding group comes back one lower — but keeping a worked example for a deliberately-lossy rewrite is a defensible call, and the sync pointer I actually cared about is there. Not raising it again. Not verifiedStill haven't built or run the Rust tests — no |
Check List
Issue Reference this PR resolves
#11542
Description of Changes Made
This PR fixes a
COUNT(DISTINCT measure) + MAX(CASE ...)query with an outerORDER BYsilently returning 1 per group instead of the real distinct count, by folding theMAX(CASE ...)half into a literal 0 in the SQL API wrapper the same way the existing grouped pushdown rule does, so the aggregation reaches Cube as a grouped request. Related test is included.