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
{{ message }}
Repository navigation
SQL: lagInFrame/leadInFrame need distinct WindowFuncKind variants, not Lag/Lead #267
`lower_window_func_kind` (`crates/frontend-sql/src/sql/mod.rs:1633`) doesn't recognize ClickHouse's `lagInFrame`/`leadInFrame`, so both fail to lower — 5 occurrences in the `bgp_jan2024_workload` 200-query corpus (#219).
The obvious fix — map them onto the existing `WindowFuncKind::Lag`/`Lead` — is wrong: ANSI `LAG`/`LEAD` (and DataFusion's native `lag`/`lead`, which `Lag`/`Lead` already model) are defined to ignore the window frame entirely, while ClickHouse's `*InFrame` family respects it. Conflating them under one variant means the frame clause is sometimes meaningful and sometimes silently ignored depending on which name got you there.
Activity
feat(sql): give lagInFrame/leadInFrame their own WindowFuncKind varia…