Skip to content
Prev Previous commit
Next Next commit
chore: Add test for mixed CTE/CSE.
Only for ClickHouse for now.
  • Loading branch information
pravic committed Sep 10, 2025
commit ec2abf60070255b8db6d97efba57c0d91aa32a5f
12 changes: 11 additions & 1 deletion tests/sqlparser_clickhouse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1743,8 +1743,18 @@ fn parse_cses() {
" count() AS count ",
"FROM logs",
);

clickhouse().verified_query(with);

let mixed = concat!(
"WITH",
" toDate(now()) AS today,",
" tbl (c) AS (SELECT toDate('2000-01-01')) ",
"SELECT",
" * ",
"FROM tbl ",
"WHERE c < today"
);
clickhouse().verified_query(mixed);
}

fn clickhouse() -> TestedDialects {
Expand Down