druid 1.1.10版本中对clickhouse的语句做parse报错,

d7v8vwbk  于 2022-11-02  发布在  Druid
关注(0)|答案(1)|浏览(341)

List statementList = SQLUtils.parseStatements("SELECT arrayFilter(x -> x LIKE '%World%', ['Hello', 'abc World']) AS res", JdbcConstants.CLICKHOUSE);

报错:
pos 43, line 1, column 42, token LBRACKET
com.alibaba.druid.sql.parser.ParserException: ERROR. pos 43, line 1, column 42, token LBRACKET
at com.alibaba.druid.sql.parser.SQLExprParser.primary(SQLExprParser.java:793)
at com.alibaba.druid.sql.parser.SQLExprParser.expr(SQLExprParser.java:86)
at com.alibaba.druid.sql.parser.SQLExprParser.exprList(SQLExprParser.java:1285)
at com.alibaba.druid.sql.parser.SQLExprParser.methodRest(SQLExprParser.java:1070)
at com.alibaba.druid.sql.parser.SQLExprParser.parseSelectItem(SQLExprParser.java:3236)
at com.alibaba.druid.sql.parser.SQLSelectParser.parseSelectList(SQLSelectParser.java:646)
at com.alibaba.druid.sql.parser.SQLSelectParser.query(SQLSelectParser.java:265)
at com.alibaba.druid.sql.parser.SQLSelectParser.query(SQLSelectParser.java:207)
at com.alibaba.druid.sql.parser.SQLSelectParser.select(SQLSelectParser.java:59)
at com.alibaba.druid.sql.parser.SQLStatementParser.parseSelect(SQLStatementParser.java:2436)
at com.alibaba.druid.sql.parser.SQLStatementParser.parseStatementList(SQLStatementParser.java:149)
at com.alibaba.druid.sql.parser.SQLStatementParser.parseStatementList(SQLStatementParser.java:72)
at com.alibaba.druid.sql.SQLUtils.parseStatements(SQLUtils.java:464)

SELECT arrayFilter(x -> x LIKE '%World%', ['Hello', 'abc World']) AS res 这句话是可以通过druid执行的 但是parseStatements报错。

t9aqgxwy

t9aqgxwy1#

怎么解决的? 我也碰到了 clickhouse

相关问题