-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/75335/#review227166
-----------------------------------------------------------




hive-agent/src/main/java/org/apache/ranger/authorization/hive/authorizer/RangerHiveAuthorizer.java
Line 182 (original)
<https://reviews.apache.org/r/75335/#comment315424>

    This change will remove the optimization introduced in RANGER-4741 to 
minimize calls to metastore APIs. I suggest inserting the following block 
before #182 and #202 (in the patched version):
    
    if (StringUtils.isBlank(owner) && objOwners != null) {
      owner = objOwners.get(objName);
    }


- Madhan Neethiraj


On Jan. 10, 2025, 2:58 p.m., Mahesh Bandal wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/75335/
> -----------------------------------------------------------
> 
> (Updated Jan. 10, 2025, 2:58 p.m.)
> 
> 
> Review request for ranger, Dineshkumar Yadav, Abhay Kulkarni, Madhan 
> Neethiraj, Mehul Parikh, Pradeep Agrawal, Ramesh Mani, Sailaja Polavarapu, 
> and Velmurugan Periasamy.
> 
> 
> Bugs: RANGER-5097
>     https://issues.apache.org/jira/browse/RANGER-5097
> 
> 
> Repository: ranger
> 
> 
> Description
> -------
> 
> Create a Hive Table as spark user from beeline and then try accessing the 
> same table from spark3-shell. The select query on Hive Table fails.
> 
> create table spark_table_123 (name string);
> select * from spark_table_123
> 
> 
> The below error is observed in spark3-shell
> 
> org.apache.spark.sql.AnalysisException: 
> org.apache.hadoop.hive.ql.metadata.HiveException: Unable to fetch table 
> spark_table_123. Permission denied: user [spark] does not have [SELECT] 
> privilege on [default/spark_table_123]
> 
> 
> Expectation:
> The Hive default policy for "Owner" user allowing "all" Access on all Hive 
> Database, table & column should allow the access.
> 
> 
> Diffs
> -----
> 
>   
> hive-agent/src/main/java/org/apache/ranger/authorization/hive/authorizer/RangerHiveAuthorizer.java
>  38b8381a5 
> 
> 
> Diff: https://reviews.apache.org/r/75335/diff/1/
> 
> 
> Testing
> -------
> 
> Ranger maven build successful.
> Ranger Setup & install successful.
> Performed sanity testing. Ensured that the repro scenario yields correct 
> evaluation result.
> 
> 
> Thanks,
> 
> Mahesh Bandal
> 
>

Reply via email to