[
https://issues.apache.org/jira/browse/HIVE-19936?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16516363#comment-16516363
]
Aihua Xu edited comment on HIVE-19936 at 6/18/18 10:27 PM:
-----------------------------------------------------------
patch-1: the source code change is to add the inputs/outputs from explain
command. For explain command like {{explain alter table foobar add partition
(val=50);}}, the inputs/outputs should be the one from the query itself. I
checked MySQL and Oracle,
https://www.vividcortex.com/blog/2014/07/28/what-privileges-does-explain-require/
and
https://docs.oracle.com/cd/B19306_01/server.102/b14200/statements_9010.htm,
both require the same privilege as the query itself.
It will affect many test cases since the inputs/outputs of PREHOOK and
POSTHOOK get updated. Will update that later if this change makes sense.
was (Author: aihuaxu):
patch-1: the source code change is to add the inputs/outputs from explain
command. It will affect many test cases since the inputs/outputs of PREHOOK
and POSTHOOK get updated. Will update that later if this change makes sense.
> explain on a query failing in secure cluster whereas query itself works
> -----------------------------------------------------------------------
>
> Key: HIVE-19936
> URL: https://issues.apache.org/jira/browse/HIVE-19936
> Project: Hive
> Issue Type: Bug
> Components: Hooks
> Reporter: Aihua Xu
> Assignee: Aihua Xu
> Priority: Major
> Attachments: HIVE-19936.1.patch
>
>
> On a secured cluster with Sentry integrated run the following queries
> {noformat}
> create table foobar (id int) partitioned by (val int);
> explain alter table foobar add partition (val=50);
> {noformat}
> The explain query will fail with the following exception while the query
> itself works with no issue.
> Error while compiling statement: FAILED: SemanticException No valid
> privileges{color}
> Required privilege( Table) not available in output privileges
> The required privileges: (state=42000,code=40000)
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)