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


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

Review Comment:
   you do not need `SessionStateUtil` here at all
   
   ````
   org.apache.iceberg.PartitionSpec partitionSpec = 
SchemaUtils.createPartitionSpec(schema, table.getPartitionKeys());
   
   restCatalog.buildTable(TableIdentifier.of(table.getDbName(), 
table.getTableName()), schema)
     .withPartitionSpec(partitionSpec)
   ````
   SchemaUtils
   ````
   public PartitionSpec createPartitionSpec(Schema schema, List<FieldSchema> 
partitionBy) {
     if (partitionBy.isEmpty()) {
         return PartitionSpec.unpartitioned();
     }
     
    PartitionSpec.Builder builder = PartitionSpec.builderFor(schema);
       partitionBy.forEach(spec -> {
       ....
       });
       return builder.build();
   }
   ````
   



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