You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@hive.apache.org by GitBox <gi...@apache.org> on 2021/06/14 12:03:11 UTC

[GitHub] [hive] lcspinter commented on a change in pull request #2382: HIVE-25234: Implement ALTER TABLE ... SET PARTITION SPEC to change partitioning on Iceberg tables

lcspinter commented on a change in pull request #2382:
URL: https://github.com/apache/hive/pull/2382#discussion_r650885011



##########
File path: iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/hive/IcebergTableUtil.java
##########
@@ -106,4 +111,61 @@ public static PartitionSpec spec(Configuration configuration, Schema schema) {
     });
     return builder.build();
   }
+
+  public static void updateSpec(Configuration configuration, Table table) {
+    // get the new partition transform spec
+    PartitionSpec newPartitionSpec = spec(configuration, table.schema());
+    if (newPartitionSpec == null) {
+      LOG.debug("Iceberg Partition spec is not updated due to empty partition spec definition.");

Review comment:
       We can get null values if the SessionState is somehow lost. Or the method is called from a different process (like Tez). I just wanted to make sure we log this.




-- 
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.

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



---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org