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

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

                Author: ASF GitHub Bot
            Created on: 05/Apr/23 06:53
            Start Date: 05/Apr/23 06:53
    Worklog Time Spent: 10m 
      Work Description: 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(..)`
   





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

    Worklog Id:     (was: 854946)
    Time Spent: 2h 40m  (was: 2.5h)

> Iceberg: Add support for rename table
> -------------------------------------
>
>                 Key: HIVE-27208
>                 URL: https://issues.apache.org/jira/browse/HIVE-27208
>             Project: Hive
>          Issue Type: Improvement
>            Reporter: Ayush Saxena
>            Assignee: Ayush Saxena
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 2h 40m
>  Remaining Estimate: 0h
>
> Add support for renaming iceberg tables.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to