pub fn eliminate_qualify(expr: Expression) -> Result<Expression>Expand description
Eliminate QUALIFY clause by converting to a subquery with WHERE filter
QUALIFY is supported by Snowflake, BigQuery, and DuckDB but not by most other dialects.
Converts:
SELECT * FROM t QUALIFY ROW_NUMBER() OVER (...) = 1To:
SELECT * FROM (SELECT *, ROW_NUMBER() OVER (...) AS _w FROM t) _t WHERE _w = 1Reference: transforms.py:194-255