apache / datafusion-sqlparser-rs

Extensible SQL Lexer and Parser for Rust
Apache License 2.0
2.8k stars 543 forks source link

Clickhouse `WITH <expression> AS <identifier>` syntax #1514

Open matthieugouel opened 1 week ago

matthieugouel commented 1 week ago

Hey 👋

The WITH <expression> AS <identifier> (doc here) does not seem to be supported.

For instance, this command with the ClickHouseDialect does not work (nor with GenericDialiect):

WITH concat(prefix_addr, '/', prefix_len) AS prefix SELECT prefix FROM table
sql parser error: Expected: (, found: prefix at Line: 1, Column: 46