You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
enhancementjdbcModule: the JDBC driver (jdbc-v2; with legacy: the v1 driver)queriesArea: how the client builds and runs statements (parameters, quoting, batches)sql-parserDetail: the SQL parser of the JDBC driver (v1 and v2)
JDBC Driver has some tasks where parser is the best choice. Parser at the same time is a big issue because if it cannot validate new statement we have to fix it in the code.
We need to develop a version that parses only specific statements and passes rest of them to server.
This parser should be implemented with ANTLR4 for better portability.
It requires good negative testing to verify that most statements are not blocked by parse.
It required complete coverage for known statements.
Recommendation: Keep open — implementation needed main has no parser that reads only some statements and sends the others through unchanged. The issue does not list the statements that the light parser must read; a maintainer can add that list before the work starts.
Analysis: jdbc-v2 has three parsers, selected by jdbc_sql_parser (DriverProperties.java:84, default JAVACC; SqlParserFacade.java:731), and each is a full grammar for all statement kinds (ClickHouseParser.g4:13-46, ClickHouseSqlParser.jj). A statement that a grammar does not match is not blocked: the driver sends it as a query (ClickHouseSqlParser.jj:95-104, SqlParserFacade.java:254). But the facts that the driver reads from it (kind, table, values list) can be wrong, and a new server keyword can need a grammar change: the related grammar issues are such cases.
Automated triage by Polyglot AI. A maintainer makes the final decision.
enhancementjdbcModule: the JDBC driver (jdbc-v2; with legacy: the v1 driver)queriesArea: how the client builds and runs statements (parameters, quoting, batches)sql-parserDetail: the SQL parser of the JDBC driver (v1 and v2)
Activity
polyglotAI-bot commentedon Nov 27, 2026
Recommendation: Keep open — implementation needed
mainhas no parser that reads only some statements and sends the others through unchanged. The issue does not list the statements that the light parser must read; a maintainer can add that list before the work starts.main: Not supported on main — code read at8480ca00; nothing ran.shardsas an identifier #3428, jdbc-v2: ANTLR4 parsers do not accept a heredoc as an ON CLUSTER name or a column comment #3393, jdbc-v2: JavaCC parser does not accept a heredoc as an ON CLUSTER name or an INTERVAL string #3391 — open grammar defects of the current parsers.Analysis: jdbc-v2 has three parsers, selected by
jdbc_sql_parser(DriverProperties.java:84, defaultJAVACC;SqlParserFacade.java:731), and each is a full grammar for all statement kinds (ClickHouseParser.g4:13-46,ClickHouseSqlParser.jj). A statement that a grammar does not match is not blocked: the driver sends it as a query (ClickHouseSqlParser.jj:95-104,SqlParserFacade.java:254). But the facts that the driver reads from it (kind, table, values list) can be wrong, and a new server keyword can need a grammar change: the related grammar issues are such cases.Automated triage by Polyglot AI. A maintainer makes the final decision.