amogh-jahagirdar commented on code in PR #10724:
URL: https://github.com/apache/iceberg/pull/10724#discussion_r1686880606


##########
core/src/main/java/org/apache/iceberg/DataFiles.java:
##########
@@ -259,11 +268,19 @@ public Builder withFileSizeInBytes(long 
newFileSizeInBytes) {
     }
 
     public Builder withPartitionPath(String newPartitionPath) {
+      return withPartitionPath(newPartitionPath, 
DEFAULT_PARTITION_STRING_CONVERSION);
+    }
+
+    public Builder withPartitionPath(
+        String newPartitionPath, BiFunction<String, Type, Object> 
partitionPathConverter) {

Review Comment:
   Yes, let me update the description to be clear. But In short, one use case 
is for Delta Uniform Iceberg metadata conversion. Currently, timestamp types 
are not supported for partition columns and Iceberg's `Conversion` utility 
https://github.com/apache/iceberg/blob/main/api/src/main/java/org/apache/iceberg/types/Conversions.java#L69
 does not handle timestamps.
   
   I was a bit hestitant to add another case for Timestamp to that utility 
since Iceberg does not specify (and arguably *should not*) specify how to 
convert string partition values into a given type. For now it's all Hive style 
assumptions which was done to facilitate migration use cases. 
   
   Since Iceberg does not specify this conversion behavior exposing an API 
which allows people to pass in their own converter was the first approach that 
came to mind for solving the problem I had but arguably if that's the only use 
case, one could also make the case that Delta Uniform should take the 
responsibility of converting to Partition tuples and using the existing 
DataFile APIs? Def open to that as well. 
   



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