AI disclosure: this issue was prepared with AI coding agents, revised and verified by me.
Failing SQL Feature:
ClickHouse column modifiers on * / t.*: the documented APPLY modifier is silently mis-parsed as a select-item alias, the documented modifier chain from the SELECT docs fails with a ParseException, and the STRICT variants plus the regex-string form of EXCEPT (implemented in the ClickHouse grammar, covered by its stateless tests) are unsupported.
SQL Example:
-- 1) documented in the ClickHouse SELECT docs, mis-parsed on master:
-- parses as AllColumns with alias "APPLY(sum)"
SELECT * APPLY(sum) FROM t;
-- 2) the modifier chain exactly as shown in the ClickHouse docs, fails:
SELECT * REPLACE(i + 1 AS i) EXCEPT (j) APPLY(sum) FROM columns_transformers;
-- 3) STRICT variants (undocumented, but in the ClickHouse grammar and
-- its stateless tests) and the regex form of EXCEPT, all fail:
SELECT * EXCEPT STRICT (a, b) FROM t;
SELECT * REPLACE STRICT (1 AS a, 2 AS b) FROM t;
SELECT * EXCEPT '^tmp_' FROM t;
Baseline that already parses: SELECT * EXCEPT (a, b) FROM t, SELECT * REPLACE (a AS b) FROM t, SELECT * EXCLUDE (a) FROM t.
Software Information:
- JSqlParser version: current master 5.4-SNAPSHOT, commit 02b9d94 (tested 2026-09-14)
- Database: ClickHouse
Additional context
AI disclosure: this issue was prepared with AI coding agents, revised and verified by me.
Failing SQL Feature:
ClickHouse column modifiers on
*/t.*: the documentedAPPLYmodifier is silently mis-parsed as a select-item alias, the documented modifier chain from the SELECT docs fails with a ParseException, and theSTRICTvariants plus the regex-string form ofEXCEPT(implemented in the ClickHouse grammar, covered by its stateless tests) are unsupported.SQL Example:
Baseline that already parses:
SELECT * EXCEPT (a, b) FROM t,SELECT * REPLACE (a AS b) FROM t,SELECT * EXCLUDE (a) FROM t.Software Information:
Additional context
STRICTafter both EXCEPT and REPLACE, and a string-literal regex pattern for EXCEPT (ExpressionElementParsers.cpp:is_strict,ParserStringLiteral->ASTColumnsExceptTransformer::setPattern, formatted asEXCEPT STRICTinASTColumnsTransformers.cpp); covered by the stateless tests01470_columns_transformers.sqland02343_analyzer_column_transformers_strict.sql.COLUMNS('regexp')context for the documented modifiers; the asterisk position is untouched there, so this issue is independent of it.