You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "KIRTI RUGE (Jira)" <ji...@apache.org> on 2022/11/07 08:18:00 UTC

[jira] [Commented] (HIVE-26085) "getTableObjectByName method should ignore it" exception doesn't include cause

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

KIRTI RUGE commented on HIVE-26085:
-----------------------------------

Can I take this?

> "getTableObjectByName method should ignore it" exception doesn't include cause
> ------------------------------------------------------------------------------
>
>                 Key: HIVE-26085
>                 URL: https://issues.apache.org/jira/browse/HIVE-26085
>             Project: Hive
>          Issue Type: Improvement
>          Components: Parser
>         Environment: HDP 3.1.5
>            Reporter: Wataru Yukawa
>            Priority: Major
>
> current logic doesn't contain cause
> https://github.com/apache/hive/blob/a6e93633dc15aba179fb6ad422be4cbc88adf071/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java#L12208
> but
> {code}
> throw new SemanticException("Got exception though getTableObjectByName method should ignore it", e)
> {code}
> seems better for troubleshooting.
> We encounter this issue when user access hive view where user doesn't hive permission in original hive table.
> {code}
> create view aaa_view
> as
> select ... from aaa
> {code}
> "getTableObjectByName" exception happens when user try to access "aaa_view" but doesn't have permission "aaa" table with apache ranger.
> {code}
> Caused by: java.lang.RuntimeException: org.apache.hadoop.hive.ql.parse.SemanticException:Got exception though getTableObjectByName method should ignore it
>         at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.walkASTMarkTABREF(SemanticAnalyzer.java:12020)
>         at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.rewriteASTWithMaskAndFilter(SemanticAnalyzer.java:12139)
>         at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.replaceViewReferenceWithDefinition(SemanticAnalyzer.java:2608)
>         at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.getMetaData(SemanticAnalyzer.java:2192)
>         at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.getMetaData(SemanticAnalyzer.java:2103)
>         at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.getMetaData(SemanticAnalyzer.java:2257)
>         at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.getMetaData(SemanticAnalyzer.java:2088)
>         at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genResolvedParseTree(SemanticAnalyzer.java:12234)
>         at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:12328)
>         at org.apache.hadoop.hive.ql.parse.CalcitePlanner.analyzeInternal(CalcitePlanner.java:367)
>         at org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:290)
>         at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:664)
>         at org.apache.hadoop.hive.ql.Driver.compileInternal(Driver.java:1870)
>         at org.apache.hadoop.hive.ql.Driver.compileAndRespond(Driver.java:1817)
>         at org.apache.hadoop.hive.ql.Driver.compileAndRespond(Driver.java:1812)
>         at org.apache.hadoop.hive.ql.reexec.ReExecDriver.compileAndRespond(ReExecDriver.java:126)
>         at org.apache.hive.service.cli.operation.SQLOperation.prepare(SQLOperation.java:197)
>         ... 26 common frames omitted
> {code}
> In this case, we can't see error log like "permission denied" when user try to access "aaa_view".
> So, it would be nice to add cause



--
This message was sent by Atlassian Jira
(v8.20.10#820010)