feat(tesseract): Support separate pre-aggregations for different multi-fact subqueries#10718
Conversation
|
Claude finished @waralexrom's task in 2m 37s —— View job Code Review: Separate Pre-aggregations for Multi-fact Subqueries
SummaryThis PR refactors how multiplied (multi-fact) measures are planned and optimized in Tesseract. The key architectural change is unifying the CTE management for both multi-stage members and multiplied measures into a single What changed:
The approach is sound and the refactoring materially simplifies the codebase (~200 net lines removed despite adding tests and new functionality). Code QualityPositive:
Issues:
SecurityNo security concerns. This is internal query planning logic with no user-facing input parsing, no SQL injection vectors (queries are built via typed builders), and no auth/authz changes. Performance
TestingStrengths:
Concerns:
Minor Notes
VerdictThis is a well-designed architectural refactoring that simplifies the codebase while enabling more granular pre-aggregation matching. The main actionable feedback is around code duplication between the two rewrite methods and the missing test coverage for the pre-aggregation optimization of multiplied subqueries. The rest is solid. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #10718 +/- ##
=======================================
Coverage 78.78% 78.78%
=======================================
Files 466 466
Lines 92050 92050
Branches 3378 3378
=======================================
+ Hits 72525 72526 +1
+ Misses 19033 19032 -1
Partials 492 492
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
a884e18 to
64242fe
Compare
…i-fact subqueries
8a7bcd9 to
48526d0
Compare
|
Claude finished @waralexrom's task in 2m 14s —— View job Code Review: Separate Pre-aggregations for Multi-fact Subqueries
SummaryThis PR makes a significant architectural improvement to Tesseract's query planning for multiplied (multi-fact) measures. The key change is unifying CTE management for both multi-stage members and multiplied measures into a single Core architectural changes:
The refactoring is well-designed — it reduces net code (~200 lines removed despite significant new tests) while enabling genuinely new functionality. Code QualityStrengths:
Issues:
SecurityNo security concerns. All changes are internal query planning logic. No user-facing input parsing, no SQL injection vectors (queries built via typed builders), and no auth/authz changes. Performance
TestingStrengths:
One observation:
VerdictThis is a well-executed architectural refactoring. It simplifies the codebase materially while enabling more granular pre-aggregation matching for multi-fact queries. The test coverage is thorough and addresses gaps from the prior review (rollback behavior, filtered variants). The main actionable feedback is around code duplication between the two rewrite methods and documenting the |
Check List