fix(tesseract): Honor memberToAlias for granularized time dimensions#11142
fix(tesseract): Honor memberToAlias for granularized time dimensions#11142ovr wants to merge 2 commits into
Conversation
|
Claude finished @ovr's task in 1m 8s —— View job Code Review — Verdict: LGTM (1 low, 1 nit)Review details
SummaryThe fix is well-scoped and correct: when ObservationsLow — derived-symbol constructors still call Nit — Praise
|
cba842e to
bdec914
Compare
In a wrapped SQL-API query, cubesql pushes a grouped CubeScan whose
granularized time-dimension column it references by an explicit alias,
sent via `memberToAlias` keyed `{member}.{granularity}` (e.g.
`orders.created_at.month` -> `datetrunc_utf8__`). Regular dimensions and
measures already honor this override, but `TimeDimensionSymbol` computed
its alias as `{base alias}_{granularity}` (`orders__created_at_month`)
and ignored the override. The wrapper then referenced a column the
CubeScan never emitted -> `column "datetrunc_utf8__" does not exist`.
Look up the `memberToAlias` override for the granularized member in
`compile_time_dimensions` and pass it through a new
`TimeDimensionSymbol::new_with_alias`. When no override is present the
alias is unchanged, so non-pushdown queries are unaffected.
|
Claude finished @ovr's task in 1m 2s —— View job Code ReviewVerdict: LGTM — small, well-scoped fix. No issues found. Details
What the fix does
Correctness notes
Tests
Nits / non-blocking
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #11142 +/- ##
=======================================
Coverage 79.18% 79.18%
=======================================
Files 474 474
Lines 96880 96880
Branches 3558 3558
=======================================
+ Hits 76712 76714 +2
+ Misses 19650 19648 -2
Partials 518 518
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:
|
In a wrapped SQL-API query, cubesql pushes a grouped CubeScan whose granularized time-dimension column it references by an explicit alias, sent via
memberToAliaskeyed{member}.{granularity}(e.g.orders.created_at.month->datetrunc_utf8__). Regular dimensions and measures already honor this override, butTimeDimensionSymbolcomputed its alias as{base alias}_{granularity}(orders__created_at_month) and ignored the override. The wrapper then referenced a column the CubeScan never emitted ->column "datetrunc_utf8__" does not exist.Look up the
memberToAliasoverride for the granularized member incompile_time_dimensionsand pass it through a newTimeDimensionSymbol::new_with_alias. When no override is present the alias is unchanged, so non-pushdown queries are unaffected.