[ 
https://issues.apache.org/jira/browse/EAGLE-333?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15320928#comment-15320928
 ] 

ASF GitHub Bot commented on EAGLE-333:
--------------------------------------

Github user pkuwm commented on the issue:

    https://github.com/apache/incubator-eagle/pull/230
  
    Reviewed.
    This fix is for "distinct" which we did not support before. So add 
"TOK_FUNCTIONDI" in the parser to parse "distinct".
    Looks good to me. It can be merged.


> 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)

Reply via email to