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 = HiveSchemaUtil.spec(schema, catalogProperties)
````
org.apache.iceberg.mr.Catalogs
````
public static PartitionSpec spec(Schema schema, Properties props) {
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 HiveSchemaUtil and reuse it in HiveIcebergMetaHook 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]