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


##########
iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/hive/HiveIcebergMetaHook.java:
##########
@@ -1181,6 +1178,51 @@ public void 
preDropPartitions(org.apache.hadoop.hive.metastore.api.Table hmsTabl
     context.putToProperties(HiveMetaStoreClient.SKIP_DROP_PARTITION, "true");
   }
 
+  private static void validatePartitionSpec(SearchArgument sarg, Table 
icebergTbl,
+      Map<String, PartitionField> partitionFieldMap) {
+    for (PredicateLeaf leaf : sarg.getLeaves()) {
+      TransformSpec transformSpec = 
TransformSpec.fromStringWithColumnName(leaf.getColumnName());
+      Types.NestedField column = 
icebergTbl.schema().findField(transformSpec.getColumnName());
+      PartitionField partitionColumn =

Review Comment:
   I mean why construct map if we never access it via keys, we should have just 
a list of partition fields. previously we use `containsKey` that is removed now
   ````
    Map<String, PartitionField> partitionFieldMap =
           
icebergTbl.spec().fields().stream().collect(Collectors.toMap(PartitionField::name,
 Function.identity()));
   ````
   can't we simply use `icebergTbl.spec().fields()`?



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