Skip to content

[pull] master from cube-js:master - #639

Merged
pull[bot] merged 2 commits into
code:masterfrom
cube-js:master
Jul 30, 2026
Merged

[pull] master from cube-js:master#639
pull[bot] merged 2 commits into
code:masterfrom
cube-js:master

Conversation

@pull

@pull pull Bot commented Jul 30, 2026

Copy link
Copy Markdown

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? πŸ’– Please sponsor : )

MikeNitsenko and others added 2 commits July 30, 2026 22:02
* docs: document dbt pull primary key detection and reverse joins

Describe the three-tier primary key ladder (dbt constraints β†’ strict
unique + not_null tests β†’ column-name suffixes), the new pull options,
and add troubleshooting for missing/incorrect keys and one-directional
joins.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* docs: address review feedback on dbt primary key section

- "Every cube needs a primary_key" β€” a cube can end up without one
- constraints snippet now includes the enforced model contract dbt
  requires, plus a pointer to the test-based path for projects without
  contracts
- name the parent option instead of "the option above"/"below"
- attribute pull-time behavior to "the pull", not "Cube"

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* docs: correct the join relationship type dbt pull generates

Generated joins are always many_to_one from the cube owning the foreign
key; one_to_many/one_to_one were never emitted for forward joins.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* docs: cover forced join keys and all-or-nothing constraints in dbt pull

Verified the page against the implementation: document that join target
columns are keyed regardless of the tiers, that a primary_key constraint
naming an undocumented column is skipped entirely, and that foreign-key
avoidance is a preference with a fallback. Order the pull options to
match the settings card.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* docs: clarify join-target keys and drop references to server-side logs

Join-referenced columns are additive on top of the tiers and apply to
the referenced cube only, so the FK owner is what typically ends up
keyless. Replace pointers to pull log output, which isn't surfaced to
users, with the compile error and the generated .yml.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* docs: qualify the keyless-cube symptom in dbt pull

The compile error only fires when the cube has an aggregatable measure;
without one the join is dropped with no error. Quote the full message.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* docs: full consistency pass on the dbt primary key content

- name the measure types that trigger the compile error, and the
  runtime "Can't find join path" failure when none is present
- drop the unqualified "Cube requires a key on both ends of every join"
- Limitations no longer claims tests are unused; they feed key and join
  detection
- note that warehouse enforcement is irrelevant (the pull only parses)
- a dbt relationship describes one side, rather than dbt being unable to
  declare both

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
… single declaration (#11409)

* refactor(tesseract): unify MemberSymbol dependency traversal behind a single declaration

Each symbol node now declares its dependency slots exactly once β€” via the
symbol_deps! macro for structs (full destructuring, so a new field fails to
compile until classified) or a hand-written SymbolDeps impl for enums β€” and
both the read side (collect_deps, collect_cube_refs) and the rebuild side
(apply_recursive, apply_to_deps) are derived from that declaration by generic
algorithms in planner/symbols/deps.rs. This replaces the per-node hand-written
get_dependencies / extract_symbol_deps / get_cube_refs / extract_cube_refs /
apply_to_deps bodies, which enumerated the same slots independently.

Semantic points:
- A dependency is a symbol or cube ref whose rendered SQL enters the node's
  SQL. Multi-stage grain/filter member lists are annotations matched by
  full_name, not dependencies: apply_to_deps no longer rewrites them.
- TimeDimensionSymbol::base_symbol is a transparent slot: reads emit the
  base's dependencies, transforms receive the slot itself.
- Transform semantics are uniform: f is applied to every symbol node exactly
  once, recursion is handled by the algorithm.
- Slot order is a contract (declaration order); reference symbols resolve to
  their first dependency.
- iter_sql_calls/validate, owned_by_cube and DebugSql stay bespoke.

* test(tesseract): pin the TimeDimension dependency contract

The base symbol is a granularity view, not a dependency: reads look
through it (emitting the base's own dependencies), while transforms
receive it as a replaceable slot and the wrapper keeps its identity.

* test(tesseract): cover switch and case-switch dimensions in multi-stage include grain

Include grain refs are selected inside the multi-stage CTEs; case
pruning and calc-group value resolution follow each leaf's own filters
(the leaf rebuilds its QueryProperties, re-applying static filters), so
a leaf whose filter directive excludes the switch filter keeps the full
CASE while a filtered leaf renders the pruned branch.
@pull pull Bot locked and limited conversation to collaborators Jul 30, 2026
@pull
pull Bot merged commit d8d009b into code:master Jul 30, 2026
5 of 7 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants