Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SQLUtils.parseStatements无法解析clickhouse语法GLOBAL JOIN #4409

Closed
liangyongz opened this issue Aug 10, 2021 · 3 comments
Closed

SQLUtils.parseStatements无法解析clickhouse语法GLOBAL JOIN #4409

liangyongz opened this issue Aug 10, 2021 · 3 comments

Comments

@liangyongz
Copy link

版本

1.2.6

sql

select id from tableA t1 GLOBAL join tableB t2 on t1.id=t2.id

报错

Exception in thread "main" com.alibaba.druid.sql.parser.ParserException: syntax error, error in :'id from tableA t1 global join tableB t2 on t1.id, pos 31, line 1, column 26, token GLOBAL
at com.alibaba.druid.sql.parser.SQLParser.printError(SQLParser.java:576)
at com.alibaba.druid.sql.parser.SQLStatementParser.parseStatementList(SQLStatementParser.java:602)
at com.alibaba.druid.sql.SQLUtils.parseStatements(SQLUtils.java:565)
at com.alibaba.druid.sql.SQLUtils.parseStatements(SQLUtils.java:587)
at io.terminus.dice.fdp.tagengine.utils.TsqlUtil.convertDruidChsql(TsqlUtil.java:112)
at io.terminus.dice.fdp.tagengine.utils.TsqlUtil.main(TsqlUtil.java:124)

https://github.com/alibaba/druid/issues/3977显示1.2.2已解决,但是在1.2.6中还是无法解析clickhouse的global

@liangyongz
Copy link
Author

我使用#3977 的sql测试
结果:只支持GLOBAL IN;不支持:GLOBAL JOIN/LEFT JOIN等
image
@wenshao 麻烦大佬看下

@damonyoungs
Copy link

1.2.8的版本已修复此问题

@Gaobutian
Copy link

我的1.2.8版本仍然有这个问题

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants