ClickHouse supports lambda expressions in WITH clauses, which can then be referenced as named expressions in the SELECT statement.
JSQLParser fails to parse a minimal ClickHouse query containing a lambda expression in a WITH clause.
SQL Example
WITH (x -> x * 2) AS double
SELECT double(5);
This query executes successfully in ClickHouse and returns: 10
Parsing error
JSQLParser throws the following exception:
ParseException: Encountered:, at line 1, column 6, in lexical state DEFAULT.
The parser fails at the beginning of the WITH expression, specifically when encountering the lambda expression:
(x -> x * 2)
Tested with ClickHouse 26.8.
ClickHouse supports lambda expressions in
WITHclauses, which can then be referenced as named expressions in theSELECTstatement.JSQLParser fails to parse a minimal ClickHouse query containing a lambda expression in a
WITHclause.SQL Example
This query executes successfully in ClickHouse and returns:
10Parsing error
JSQLParser throws the following exception:
ParseException: Encountered:, at line 1, column 6, in lexical state DEFAULT.The parser fails at the beginning of the WITH expression, specifically when encountering the lambda expression:
(x -> x * 2)Tested with
ClickHouse 26.8.