ayushtkn commented on code in PR #4185:
URL: https://github.com/apache/hive/pull/4185#discussion_r1158093290


##########
ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java:
##########
@@ -875,10 +876,17 @@ public void alterTable(String catName, String dbName, 
String tblName, Table newT
       if (newTbl.getParameters() != null) {
         newTbl.getParameters().remove(hive_metastoreConstants.DDL_TIME);
       }
-      newTbl.checkValidity(conf);
       if (environmentContext == null) {
         environmentContext = new EnvironmentContext();
       }
+      if (environmentContext.isSetProperties() && 
AlterTableType.RENAME.toString()

Review Comment:
   **environmentContext.isSetProperties()** is a **NULL** check for properties 
map inside, if that isn't set the map inside is null, trying to fetch value 
from that would fetch us an **NPE**. 
   done at all places:
   
https://github.com/apache/hive/blob/master/standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/utils/MetaStoreServerUtils.java#L462
   
   have refactored to use`AlterTableType.valueOf(..)`
   



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to