ayushtkn commented on code in PR #5645:
URL: https://github.com/apache/hive/pull/5645#discussion_r1965454188
##########
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:
leaf.getColumName() will have years(reading_time), that won't match either.
We need to get the PartitionField from this map to check the Transform that
is provided is same as that we have received in transformSpec (from user)
--
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]