feat(cubesql): add disablePostProcessing flag to /v1/cubesql - #11462
feat(cubesql): add disablePostProcessing flag to /v1/cubesql#11462MazterQyou wants to merge 1 commit into
disablePostProcessing flag to /v1/cubesql#11462Conversation
|
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 5m 28s —— View job Review: solid design, one correctness gap in what counts as post-processing — 1 medium-high, 3 medium, 3 lowFull review
What's good
Findings
Details for 1, 2, 3 and 5 are in inline comments. On #4 (naming). Design note (not a defect)The check treats any in-memory node above an unbounded scan as unsafe, including row-wise ones. Also worth a mention in the docs: Not verifiedI did not compile the Rust or run either test suite in this environment — the review is by inspection. Worth confirming |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #11462 +/- ##
==========================================
+ Coverage 79.45% 79.50% +0.05%
==========================================
Files 480 481 +1
Lines 98810 99059 +249
Branches 3636 3636
==========================================
+ Hits 78511 78759 +248
- Misses 19778 19779 +1
Partials 521 521
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:
|
27cbc37 to
6e9de3e
Compare
|
Claude finished @MazterQyou's task in 4m 22s —— View job Re-review after force-push: 3 of 4 prior findings fixed well — 1 medium open (unvalidated flag at the gateway), 2 lowFull review
The branch was force-pushed (previous head Prior findings — now fixed#1 #2 wrapper over a bare #5 native test no-op under Still open
Also re-verified since the last pass, all still fine: the cost tier's position in Design notes (not defects)
The docs section is clear and the anchors resolve. Still worth a sentence on Not verified
|
Signed-off-by: Alex Qyoun-ae <4062971+MazterQyou@users.noreply.github.com>
6e9de3e to
f63321d
Compare
|
Claude finished @MazterQyou's task in 2m 19s —— View job Re-review after force-push: the negative-limit fix landed — no open correctness findings; 1 low (naming) remainsFull review
What changed since my last pass
Nothing else moved in this push, and I re-verified the rest of the change rather than assuming:
Still open
The gateway-validation thread is resolved — following Design notes carried over (not defects)Unchanged from my prior passes, restated only so they're not lost: the guard rejects "post-processing reads a truncated result", not "post-processing would be wrong". A bare row-wise projection ( Still worth one sentence in the docs on Not verified
|
Check List
Description of Changes Made
This PR adds an opt-in
disablePostProcessingflag to/v1/cubesqlthat rejects queries whose post-processing would run over a result silently truncated toCUBEJS_DB_QUERY_LIMITrows.A query that can't be fully pushed down is completed in memory over at most
CUBEJS_DB_QUERY_LIMITrows. When nothing bounds the pushed-down subtree, that result is truncated and the post-processing above it returns a wrong answer with no error.Setting
disablePostProcessingon the request rejects those queries. Plans whose post-processing reads a result bounded by a smaller limit are left alone, as are plans with no cube scan at all: neither can be truncated. Inert underCUBESQL_STREAM_MODE, where the scan streams every row.Extraction counts the offending plan shape in a new
truncated_post_processing_scanscost, so a fully pushed-down plan wins where one exists; the request only fails when none does.Related tests are included.