You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@eagle.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2016/06/08 16:03:20 UTC
[jira] [Commented] (EAGLE-333) Hive ql.Parser can't parse complex
query
[ https://issues.apache.org/jira/browse/EAGLE-333?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15320822#comment-15320822 ]
ASF GitHub Bot commented on EAGLE-333:
--------------------------------------
GitHub user wangyum opened a pull request:
https://github.com/apache/incubator-eagle/pull/230
EAGLE-333 Fix hive.ql.Parser can't parse complex SQL.
1. Use parseTokFunction() to parse HiveParser.TOK_FUNCTIONDI type.
[EAGLE-333](https://issues.apache.org/jira/browse/EAGLE-333)
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/wangyum/incubator-eagle EAGLE-333
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/incubator-eagle/pull/230.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #230
----
commit 4d58b4e45f90607816fe9bf7e0bf4438f622ff6c
Author: Yuming Wang <wg...@gmail.com>
Date: 2016-06-08T15:49:40Z
Fix hive.ql.Parser can't parse complex SQL.
----
> Hive ql.Parser can't parse complex query
> ----------------------------------------
>
> Key: EAGLE-333
> URL: https://issues.apache.org/jira/browse/EAGLE-333
> Project: Eagle
> Issue Type: Bug
> Affects Versions: v0.3.0, v0.4.0
> Reporter: Yuming Wang
> Priority: Minor
>
> For example, parse following query:
> {code:sql}
> SELECT count(distinct id) FROM db.table1
> {code}
> will throw *NullPointerException*:
> {panel}
> java.lang.NullPointerException
> at org.apache.eagle.security.hive.ql.Parser.addToColumnSet(Parser.java:356)
> at org.apache.eagle.security.hive.ql.Parser.parseSelectExpr(Parser.java:285)
> at org.apache.eagle.security.hive.ql.Parser.parseSelectExpr(Parser.java:327)
> at org.apache.eagle.security.hive.ql.Parser.parseSelectClause(Parser.java:277)
> at org.apache.eagle.security.hive.ql.Parser.parseInsertClause(Parser.java:218)
> at org.apache.eagle.security.hive.ql.Parser.parseQueryClause(Parser.java:194)
> at org.apache.eagle.security.hive.ql.Parser.parseQL(Parser.java:117)
> at org.apache.eagle.security.hive.ql.Parser.run(Parser.java:81)
> at org.apache.eagle.security.hive.ql.TestParser._testParsingQuery(TestParser.java:44)
> at org.apache.eagle.security.hive.ql.TestParser.testCountDistinct(TestParser.java:245)
> {panel}
> The root cause is _ASTNode_ is _TOK_FUNCTIONDI_ type at this time, so use _parseTokFunction()_ to parse it.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)