pvary commented on code in PR #18508:
URL: https://github.com/apache/iceberg/pull/18508#discussion_r4293698974


##########
flink/v2.3/flink/src/main/java/org/apache/iceberg/flink/RowDataWrapper.java:
##########
@@ -84,79 +88,105 @@ public <T> void set(int pos, T value) {
         "Could not set a field in the RowDataWrapper because rowData is 
read-only");
   }
 
-  private interface PositionalGetter<T> {
-    T get(RowData data, int pos);
+  private RowDataWrapper copyFor(RowData data) {
+    return new RowDataWrapper(types, getters).wrap(data);
+  }
+
+  private static RowData.FieldGetter buildGetter(LogicalType logicalType, Type 
type, int pos) {
+    RowData.FieldGetter fieldGetter = 
FlinkRowData.createFieldGetter(logicalType, pos);
+    Function<Object, Object> converter = buildConverter(logicalType, type);
+    return row -> convertOrNull(fieldGetter.getFieldOrNull(row), converter);

Review Comment:
   Do we need this many `orNull` checks? Could we just short-circuit for nulls?



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