[ 
https://issues.apache.org/jira/browse/HIVE-25514?focusedWorklogId=658451&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-658451
 ]

ASF GitHub Bot logged work on HIVE-25514:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 30/Sep/21 15:40
            Start Date: 30/Sep/21 15:40
    Worklog Time Spent: 10m 
      Work Description: nrg4878 commented on a change in pull request #2634:
URL: https://github.com/apache/hive/pull/2634#discussion_r719533659



##########
File path: 
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/HMSHandler.java
##########
@@ -5461,6 +5462,37 @@ public GetPartitionResponse 
get_partition_req(GetPartitionRequest req)
    */
   private void fireReadTablePreEvent(String catName, String dbName, String 
tblName)
       throws MetaException, NoSuchObjectException {
+    if (catName == null) {
+      throw new NullPointerException("catName is null");
+    }
+
+    if (isBlank(catName)) {
+      throw new NoSuchObjectException("catName is not valid");
+    }
+
+    if (dbName == null) {
+      throw new NullPointerException("dbName is null");
+    }
+
+    if (isBlank(dbName)) {
+      throw new NoSuchObjectException("dbName is not valid");
+    }
+
+    List<String> filteredDb = 
FilterUtils.filterDbNamesIfEnabled(isServerFilterEnabled, filterHook,
+            Collections.singletonList(dbName));
+
+    if (filteredDb.isEmpty()) {
+      throw new NoSuchObjectException("Database " + dbName + " does not 
exist");
+    }
+
+    if (tblName == null) {
+      throw new NullPointerException("tblName is null");
+    }
+
+    if (isBlank(tblName)) {
+      throw new NoSuchObjectException("tblName is not valid");
+    }
+

Review comment:
       So how is the table authorized like we used to via 
"authorizeTableForPartitionMetadata"? we are only authorizing DBs above. 




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 658451)
    Time Spent: 1h  (was: 50m)

> Alter table with partitions should honor {OWNER} policies from Apache Ranger 
> in the HMS
> ---------------------------------------------------------------------------------------
>
>                 Key: HIVE-25514
>                 URL: https://issues.apache.org/jira/browse/HIVE-25514
>             Project: Hive
>          Issue Type: Bug
>          Components: Hive, Standalone Metastore
>    Affects Versions: 4.0.0
>            Reporter: Sai Hemanth Gantasala
>            Assignee: Sai Hemanth Gantasala
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 1h
>  Remaining Estimate: 0h
>
> The following commands should honor \{OWNER} policies from Apache Ranger in 
> the HMS.
> {code:java}
> Show partitions table_name;
> alter table foo.table_name partition (country='us') rename to partition 
> (country='canada);
> alter table foo.table_name drop partition (id='canada');{code}
> The examples above are tables with partitions. So the partition APIs in HMS 
> should be modifed to honor \{owner} policies from Apache ranger. 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to