Repository navigation
Conversation
This was referenced Nov 26, 2026
👷 Deploy request for thriving-cassata-78ae72 pending review.Visit the deploys page to approve it
|
Miskho
marked this pull request as ready for review
November 26, 2026 09:14
Contributor
[Medium impact] The PR appears safe to merge; the bare Boolean filter issue is fixed. SummaryFinal dimension filters use copies of the expressions shown in the output, preserving rows supplied only by later facts in a
Reviews (2) · Last reviewed commit: "Rebind bare Boolean filters to coalesced..." · Reviewed by Greptile |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
A day filter can discard valid rows when combining metrics from facts with different dates. This PR makes the final filter use the same coalesced day that appears in the output.
For example, the regression fixture has these daily inputs. A dash means there is no input row for that day.
A
FULL OUTER JOINkeeps the visitor-only day, with the output day taken from B:COALESCE(A.day, B.day)But the old final predicate could filter on
A.day, which is NULL for this row. In simplified SQL:Resolve final dimension predicates against copies of the output projection expressions. Preserve missing metrics as NULL, filter pushdown, filter-only dimensions, metric HAVING, and the window stage's already-coalesced dimensions. Update the affected metric and cube SQL expectations.
This also handles a bare Boolean predicate such as
enabled: when the column is the entire predicate, replace the predicate root directly so it uses the coalesced output value, just asenabled = TRUEdoes.Test Plan
Local execution used Python 3.13 and DuckDB. Native Spark/Trino, other Python CI versions, and optional integration stacks were not run locally.
Deployment Plan
No schema migration. Final dimension filters use the same coalesced values as the projected result.
Companion compiler fixes, validated together: #2754 (cross-fact aggregation) and #2756 (CTE identity). These PRs share compiler files; later PRs may need rebasing after the first merge.