aokolnychyi commented on code in PR #5601:
URL: https://github.com/apache/iceberg/pull/5601#discussion_r953022722


##########
api/src/main/java/org/apache/iceberg/PartitionSpec.java:
##########
@@ -175,9 +183,11 @@ private String escape(String string) {
   public String partitionToPath(StructLike data) {
     StringBuilder sb = new StringBuilder();
     Class<?>[] javaClasses = javaClasses();
+    List<Types.NestedField> outputFields = partitionType().fields();
     for (int i = 0; i < javaClasses.length; i += 1) {
       PartitionField field = fields[i];
-      String valueString = field.transform().toHumanString(get(data, i, 
javaClasses[i]));
+      String valueString =
+          field.transform().toHumanString(outputFields.get(i).type(), 
get(data, i, javaClasses[i]));

Review Comment:
   nit: If you define a helper var for `outputFields.get(i).type()`, this would 
fit on one line.



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