You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "RussellSpitzer (via GitHub)" <gi...@apache.org> on 2023/05/31 16:03:54 UTC

[GitHub] [iceberg] RussellSpitzer commented on a diff in pull request #7744: Core, Spark: Fix migrate table in case of partitioned table with partition containing a special character

RussellSpitzer commented on code in PR #7744:
URL: https://github.com/apache/iceberg/pull/7744#discussion_r1211962729


##########
core/src/main/java/org/apache/iceberg/DataFiles.java:
##########
@@ -89,6 +89,31 @@ static PartitionData fillFromPath(PartitionSpec spec, String partitionPath, Part
     return data;
   }
 
+  static PartitionData fillFromValues(
+      PartitionSpec spec, List<String> partitionValues, PartitionData reuse) {
+    PartitionData data = reuse;
+    if (data == null) {
+      data = newPartitionData(spec);
+    }
+
+    Preconditions.checkArgument(

Review Comment:
   Could just do one check here size != size, "Invalid partition data, found %d fields, expected %d"



-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org