docs(pre-aggregations): state that every rollup must declare its own joins' keys - #11470
docs(pre-aggregations): state that every rollup must declare its own joins' keys#11470igorlukanin wants to merge 1 commit into
Conversation
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
|
Claude finished @igorlukanin's task in 54s —— View job Review: docs-only, accurate on the core rule — 1 medium issue (error string doesn't match the default planner)The rule the callout states is correct and well-placed: DetailsTodos
Findings
Verified as correct
Not done
|
a5e0b0c to
3af4c9c
Compare
|
Claude finished @igorlukanin's task in 1m 5s —— View job Re-review after reword: error-string finding resolved — 1 low nitThe reworded callout now quotes DetailsTodos
Findings
Verified as correct
Not done
• Branch: |
3af4c9c to
d06b245
Compare
|
Claude finished @igorlukanin's task in 1m 2s —— View job Re-review after the
|
| Severity | Location | Issue |
|---|---|---|
| Low | pre-aggregations.mdx:443-444 |
"check each rollup … against the joins its own cube takes part in" is wider than the rule. The checked join set is derived from the rollup_join's own join tree (PreAggregations.ts:1055), not every join on the cube — an unrelated orders → products join needs no key here. Inline comment |
Verified as correct
- "only exposes
users.nameandorders.count" — exact match fororders_with_users_rollup(measures: [CUBE.count],dimensions: [users.name]). Previous nit resolved. CUBE.user_idis indeed theorders→usersjoin key (sql: ${CUBE.user_id} = ${users.id}), and it is declared inorders_rollupwhile not exposed by therollup_join— the example does illustrate the rule.- Quoted prefix
No rollups found that can be used foris a verbatim prefix of both planners:- Tesseract (default):
"No rollups found that can be used for rollup join"(pre_aggregations_compiler.rs:513) - Legacy:
`No rollups found that can be used for a rollup join from "…"`(PreAggregations.ts:1095)
- Tesseract (default):
- "one join at a time … a rollup carrying that join's key on each side" —
preAggObjForJoinis invoked once per side per join (PreAggregations.ts:1074-1075), each filtering to rollups whosereferences.dimensionscontain every member of that side. The middle-of-a-chain conclusion follows. - "The error does not point at the key that is missing" — true; Tesseract emits no detail, and the legacy message lists the join's full member sets, not the omitted one.
- Both of my earlier threads are already resolved by the author's rewords; nothing stale left. The new nit is on a different line with a different root cause, so no duplication.
- Correct docs site (
/docs-mintlify, not the deprecated/docs);<Warning>with surrounding blank lines follows repo Mintlify conventions; nodocs.jsonchange needed (no new page). - Docs-only diff — no code, security, performance, or test surface touched.
Not done
- Did not render the Mintlify preview locally; the bot's preview build covers rendering.
• Branch: igor/core-724-docs-rollup-join-keys •
d06b245 to
a050a44
Compare
|
Claude finished @igorlukanin's task in 36s —— View job Re-review after the path-scoping reword: all three prior findings resolved — no new issuesThe callout now reads accurately end to end: the rule, the example reference, the quoted error prefix, and the scoping of which joins to check all match the implementation and the example on this page. Nothing new to flag; docs-only, ready from my side. DetailsTodos
Findings None. Verified as correct
Not done
• Branch: |
Summary
The
rollup_joinreference never stated that every rollup listed inrollupsmust declare the dimensions its own joins are on — including keys that no query selects. The page's own example includesCUBE.user_idinorders_rollupfor exactly that reason, but never says why, so the requirement was only discoverable by hitting the error.It matters most on a longer chain: a cube in the middle takes part in two joins and has to declare both keys, one of which belongs to the upstream hop and appears in no query. Missing it fails with
No rollups found that can be used for a rollup join, which reads like a product limitation rather than a schema gap — that's how #11362 came to be reported as a join-chain-depth limit.Adds a
Warningcallout underrollup_joinstating the rule and pointing at the existing example.Test plan
quoted substring is the part they share, so it matches whichever planner the reader is on.