You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Add window function support to dimensions
* Auto-update JSON schema
* Fix: route window dimension filters to outer query
Window function dimensions (LEAD, LAG, etc.) are computed in the CTE
SELECT but haven't been evaluated at CTE WHERE time. The filter pushdown
logic now detects dimensions with window != None and keeps their filters
in the outer query. Also ensures columns referenced by outer-query
filters are included in CTE SELECT lists.
* Fix: exclude window-dim filters from preagg shared filters
* Fix: exclude window dimensions from pre-aggregation materialization
Window dimensions (LEAD, LAG, etc.) are incompatible with GROUP BY in
rollup materialization SQL. generate_materialization_sql now raises a
clear ValueError when a pre-aggregation references a dimension that has
a window expression set, for both regular dimensions and time dimensions.
* Fix: route multi-model window filters away from preagg shared WHERE
* Fix: window dim check takes priority over metric check in filter classification
* Fix: apply window dim filters as outer WHERE in preagg path
Window dimension filters were only pushed into the model sub-query that
owned the window dimension, leaving other models' metrics unfiltered.
Now the window dim column is projected through the owning model's preagg
CTE and the filter is applied on the outer preagg WHERE, constraining
all models' results.
* Fix: resolve {model} in filters, add metric-named output column
_strip_model_prefixes now replaces {model} with the actual model name
before sqlglot parsing, so placeholder-based filters no longer leak
literal {model} tokens into WHERE clauses.
Multistep funnel output now includes the last-step count aliased to
the metric name, so ORDER BY metric_name works without runtime errors.
* Fix: push window dim filters into model subqueries, preserve preagg grain
Remove window_dim_extra_dims logic that added extra dimensions to preagg
subqueries, changing the CTE's aggregation grain. Instead, push window
dim filters into each owning model's model_filters dict. The recursive
generate() call handles window dim filter placement correctly in its
own outer WHERE, preserving the requested dimension grain.
Also fix merge conflict markers in test_advanced.py from prior stash.
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
0 commit comments