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
   ````
   private 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#getPartitionSpec 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: gitbox-unsubscr...@hive.apache.org

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


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

Reply via email to