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


##########
iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/hive/IcebergTableUtil.java:
##########
@@ -491,13 +491,11 @@ public static Expression 
generateExpressionFromPartitionSpec(Table table, Map<St
       String partColName = entry.getKey();
       if (partitionFieldMap.containsKey(partColName)) {
         PartitionField partitionField = partitionFieldMap.get(partColName);
-        Type resultType = 
partitionField.transform().getResultType(table.schema()
-            .findField(partitionField.sourceId()).type());
-        Object value = Conversions.fromPartitionString(resultType, 
entry.getValue());
-        TransformSpec.TransformType transformType = 
TransformSpec.fromString(partitionField.transform().toString());
-        Iterable<?> iterable = () -> 
Collections.singletonList(value).iterator();
-        if (TransformSpec.TransformType.IDENTITY == transformType) {
-          Expression boundPredicate = Expressions.in(partitionField.name(), 
iterable);
+        Transform<?, ?> transform = partitionField.transform();
+        if (transform.isIdentity()) {
+          Type resultType = 
transform.getResultType(table.schema().findField(partitionField.sourceId()).type());

Review Comment:
   since it's identity no need for getResultType
   ```
   final Type partKeyType = 
table.schema().findField(partitionField.sourceId()).type();
   final Object value = Conversions.fromPartitionString(partKeyType, 
entry.getValue());
   ````



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