[
https://issues.apache.org/jira/browse/EAGLE-330?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15319582#comment-15319582
]
ASF GitHub Bot commented on EAGLE-330:
--------------------------------------
Github user pkuwm commented on the issue:
https://github.com/apache/incubator-eagle/pull/228
The bug is due to an old-version hive's bug. If we use a query like this:
"SELECT user, id FROM db.table", we would get exceptions. This bug was fixed in
hive-1.3 and after https://issues.apache.org/jira/browse/HIVE-10731.
We are using hive-1.2 in Eagle which has this kind of bug.
The fix looks good to me. Tested on my local side. Thanks for fixing,
@wangyum
> Hive ql.Parser can't parser a hive query sql with keywords
> ----------------------------------------------------------
>
> Key: EAGLE-330
> URL: https://issues.apache.org/jira/browse/EAGLE-330
> Project: Eagle
> Issue Type: Bug
> Affects Versions: v0.3.0, v0.4.0
> Reporter: Yuming Wang
> Priority: Minor
>
> _org.apache.eagle.security.hive.ql.Parser_ can't parser a hive query sql with
> keywords,It will throw:
> {panel}
> java.lang.NullPointerException
> at org.apache.hadoop.hive.conf.HiveConf.getBoolVar(HiveConf.java:2583)
> at
> org.apache.hadoop.hive.ql.parse.HiveParser.useSQL11ReservedKeywordsForIdentifier(HiveParser.java:1000)
> at
> org.apache.hadoop.hive.ql.parse.HiveParser_IdentifiersParser.useSQL11ReservedKeywordsForIdentifier(HiveParser_IdentifiersParser.java:726)
> at
> org.apache.hadoop.hive.ql.parse.HiveParser_IdentifiersParser.identifier(HiveParser_IdentifiersParser.java:10922)
> at
> org.apache.hadoop.hive.ql.parse.HiveParser.identifier(HiveParser.java:45850)
> at
> org.apache.hadoop.hive.ql.parse.HiveParser_FromClauseParser.tableOrColumn(HiveParser_FromClauseParser.java:1146)
> ...
> {panel}
> [HIVE-10731|https://issues.apache.org/jira/browse/HIVE-10731] fix
> *NullPointerException* but will throw *FailedPredicateException*
> {panel}
> FailedPredicateException(identifier,{useSQL11ReservedKeywordsForIdentifier()}?)
> at
> org.apache.hadoop.hive.ql.parse.HiveParser_IdentifiersParser.identifier(HiveParser_IdentifiersParser.java:11833)
> at
> org.apache.hadoop.hive.ql.parse.HiveParser.identifier(HiveParser.java:47987)
> at
> org.apache.hadoop.hive.ql.parse.HiveParser_FromClauseParser.tableOrColumn(HiveParser_FromClauseParser.java:1174)
> at
> org.apache.hadoop.hive.ql.parse.HiveParser.tableOrColumn(HiveParser.java:47993)
> ...
> {panel}
> so we should construct a HiveConf and {code}set
> hive.support.sql11.reserved.keywords=false{code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)