Repository navigation
Conversation
👷 Deploy request for thriving-cassata-78ae72 pending review.Visit the deploys page to approve it
|
[Medium impact] The PR changes SQL output for linked dimensions that configure fallback values. Fix the missing defaults in single-node and pre-aggregated queries before merging. Findings
SummaryThis PR applies per-type dimension defaults to generated SQL and deprecates the single-value setting.
Reviews (1) · Last reviewed commit: "Use default_values when generating SQL f..." · Reviewed by Greptile |
| default_literal = dimension_link_default_for_column( | ||
| default_value, | ||
| default_values, | ||
| column_type, | ||
| ) |
There was a problem hiding this comment.
Some queries drop defaults. The new
default_values path needs column_type, but build_dimension_col_expr only looks it up when callers pass ctx. Both the single-node query builder in node_query.py and the pre-aggregated query path omit that argument. A joined string column with default_values: {string: Unknown} therefore stays bare in /sql/{node} output and when a pre-aggregated table is joined back to the dimension. Unmatched rows return NULL instead of the configured default, unlike the source-built metric query. Pass ctx at both call sites and cover these paths in tests.
Summary
Test Plan
make checkpassesmake testshows 100% unit test coverageDeployment Plan