felixYyu commented on a change in pull request #4376:
URL: https://github.com/apache/iceberg/pull/4376#discussion_r838060626



##########
File path: 
flink/v1.12/flink/src/main/java/org/apache/iceberg/flink/FlinkCatalog.java
##########
@@ -488,16 +489,18 @@ private static PartitionSpec toPartitionSpec(List<String> 
partitionKeys, Schema
 
   private static List<String> toPartitionKeys(PartitionSpec spec, Schema 
icebergSchema) {
     List<String> partitionKeys = Lists.newArrayList();
+    ImmutableList.Builder<String> partitionKeysBuilder = 
ImmutableList.builder();
     for (PartitionField field : spec.fields()) {
       if (field.transform().isIdentity()) {
-        partitionKeys.add(icebergSchema.findColumnName(field.sourceId()));
+        
partitionKeysBuilder.add(icebergSchema.findColumnName(field.sourceId()));
       } else {
         // Not created by Flink SQL.
         // For compatibility with iceberg tables, return empty.
         // TODO modify this after Flink support partition transform.
-        return Collections.emptyList();

Review comment:
       fixed




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