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


##########
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:
   Possible Alternatives:
   
   1. No new APIs, callers (in this case Uniform) should take the responsibiity 
of computing partition tuples themselves and use the `withPartition(StructLike 
partition)` API. 
   2. Add the conversion logic for timestamps to Conversion. I wanted to avoid 
this mostly since Iceberg doesn't specify how to convert strings to partition 
values so whatever would be implemented would have some set of assumptions 
(iso8601 string with some assumed precision etc), and I didn't want to set a 
precedent that there is some established conversion behavior that should be 
followed (since there isn't). But there's a counter argument to that which is, 
really the only remaining type that's missing in that logic is Timestamps 
anyways.



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