chenjunjiedada commented on a change in pull request #1377:
URL: https://github.com/apache/iceberg/pull/1377#discussion_r476128705



##########
File path: 
flink/src/main/java/org/apache/iceberg/flink/data/FlinkParquetWriters.java
##########
@@ -424,13 +428,7 @@ public boolean hasNext() {
           throw new NoSuchElementException();
         }
 
-        if (values.isNullAt(index)) {
-          entry.set((K) 
ArrayData.createElementGetter(keyType).getElementOrNull(keys, index), null);
-        } else {
-          entry.set((K) 
ArrayData.createElementGetter(keyType).getElementOrNull(keys, index),
-              (V) 
ArrayData.createElementGetter(valueType).getElementOrNull(values, index));
-        }
-
+        entry.set((K) keyGetter.getElementOrNull(keys, index), (V) 
valueGetter.getElementOrNull(values, index));

Review comment:
       The `ArrayData` interface only defines `getElementOrNull`.




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

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