deniskuzZ commented on code in PR #5995:
URL: https://github.com/apache/hive/pull/5995#discussion_r2294023642


##########
iceberg/iceberg-catalog/src/main/java/org/apache/iceberg/hive/HMSTablePropertyHelper.java:
##########
@@ -221,7 +222,8 @@ static void setPartitionSpec(TableMetadata metadata, 
Map<String, String> paramet
   }
 
   public static PartitionSpec getPartitionSpec(Map<String, String> props, 
Schema schema) {
-    return 
Optional.ofNullable(props.get(TableProperties.DEFAULT_PARTITION_SPEC))
+    return Optional.ofNullable(props.get(PARTITION_SPEC))

Review Comment:
   maybe more readable
   ````
   String defaultSpec = props.get(TableProperties.DEFAULT_PARTITION_SPEC);
   return Optional.ofNullable(
         props.getOrDefault(PARTITION_SPEC, defaultSpec))
     .map(spec -> PartitionSpecParser.fromJson(schema, spec))
     .orElse(PartitionSpec.unpartitioned());
   ````



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