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

Rui Li commented on SPARK-24010:
--------------------------------

Hi [~rxin], I think checking databaseExists is added in SPARK-14869. Do you 
remember why we need to check whether DB exists? In {{HiveClientImpl:: 
tableExists}}, we're telling Hive not to throw exceptions, so there shouldn't 
be exceptions if DB doesn't exist.

> Select from table needs read access on DB folder when storage based auth is 
> enabled
> -----------------------------------------------------------------------------------
>
>                 Key: SPARK-24010
>                 URL: https://issues.apache.org/jira/browse/SPARK-24010
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 2.1.0
>            Reporter: Rui Li
>            Priority: Major
>
> When HMS enables storage based authorization, SparkSQL requires read access 
> on DB folder in order to select from a table. Such requirement doesn't seem 
> necessary and is not required in Hive.
> The reason is when Analyzer tries to resolve a relation, it calls 
> [SessionCatalog::databaseExists|https://github.com/apache/spark/blob/v2.1.0/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/Analyzer.scala#L469].
>  This will call the metastore get_database API which will perform 
> authorization check.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org

Reply via email to