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


##########
iceberg/iceberg-catalog/pom.xml:
##########
@@ -69,7 +69,6 @@
     <dependency>
       <groupId>org.apache.hive</groupId>
       <artifactId>hive-exec</artifactId>
-      <scope>test</scope>

Review Comment:
   @difin try this
   ````
   List<FieldSchema> cols = Lists.newArrayList(table.getSd().getCols());
   Properties catalogProperties = 
HMSTablePropertyHelper.getCatalogProperties(table);
   Schema schema = HiveSchemaUtil.convert(cols, true);
   
   PartitionSpec spec = 
HMSTablePropertyHelper.getPartitionSpec(catalogProperties, schema)
   ````
   org.apache.iceberg.mr.Catalogs
   ````
   public static PartitionSpec spec(Properties props, Schema schema) {
     String specString = props.getProperty(InputFormatConfig.PARTITION_SPEC);
     PartitionSpec spec = PartitionSpec.unpartitioned();
     if (specString != null) {
       spec = PartitionSpecParser.fromJson(schema, specString);
     }
     return spec;
   }
   ````
   Please move it to HMSTablePropertyHelper and reuse it in 
HiveIcebergMetaHook#spec as well



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