We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
在使用com.alibaba.druid.sql.parser.SQLExprParser 类解析IMPALA SQL的时候,添加了HINT会报错。可能由于IMPALA的HINT用法和其他语言有一定差异。下面给出报错的IMPALA SQL,以下SQL在IMPALA中是合法的:
SELECT T1.a FROM D.T1 JOIN /* +shuffle */ D.T2 ON T1.x = T2.x
但是在解析时会抛出异常: Exception in thread "main" com.alibaba.druid.sql.parser.ParserException: ERROR. pos 41, line 1, column 28, token HINT
Exception in thread "main" com.alibaba.druid.sql.parser.ParserException: ERROR. pos 41, line 1, column 28, token HINT
IMPALA的HINT有三种形式:
-- 1. /* */ D.T1 JOIN /* +shuffle */ D.T2 -- 2. [ ] D.T1 JOIN [shuffle] D.T2 -- 3. 行尾注释 D.T1 JOIN -- +shuffle D.T2
目前只有第3类可以通过解析,但问题是这样的写法局限性比较大,因为是行尾注释。 所以请求兼容前两种HINT,感谢
The text was updated successfully, but these errors were encountered:
发完整的可以用于验证的sql来。
Sorry, something went wrong.
抱歉是我提问的时候没有写清楚,三个Case如下:
SELECT T1.a FROM D.T1 JOIN [shuffle] D.T2 ON T1.x = T2.x
SELECT T1.a FROM D.T1 JOIN -- +shuffle D.T2 ON T1.x = T2.x
No branches or pull requests
在使用com.alibaba.druid.sql.parser.SQLExprParser 类解析IMPALA SQL的时候,添加了HINT会报错。可能由于IMPALA的HINT用法和其他语言有一定差异。下面给出报错的IMPALA SQL,以下SQL在IMPALA中是合法的:
但是在解析时会抛出异常:
Exception in thread "main" com.alibaba.druid.sql.parser.ParserException: ERROR. pos 41, line 1, column 28, token HINT
IMPALA的HINT有三种形式:
目前只有第3类可以通过解析,但问题是这样的写法局限性比较大,因为是行尾注释。
所以请求兼容前两种HINT,感谢
The text was updated successfully, but these errors were encountered: