openinx commented on a change in pull request #2047:
URL: https://github.com/apache/iceberg/pull/2047#discussion_r585543021
##########
File path: flink/src/main/java/org/apache/iceberg/flink/data/RowDataUtil.java
##########
@@ -69,4 +74,30 @@ public static Object convertConstant(Type type, Object
value) {
}
return value;
}
+
+ /**
+ * Similar to the private {@link RowDataSerializer#copyRowData(RowData,
RowData)} method.
+ * This skips the check the arity of rowType and from,
+ * because the from RowData may contains additional column for position
deletes.
+ * Using {@link RowDataSerializer#copy(RowData, RowData)} will fail the
arity check.
+ */
+ public static RowData clone(RowData from, RowData reuse, RowType rowType,
TypeSerializer[] fieldSerializers) {
Review comment:
For my understanding, this `clone` methods is really not friendly for
developers to use. If we really need to introduce a copy with checking the
length, then how about making this to be private and expose an more easy method
to public :
```java
public static RowData clone(RowData from, RowType rowType)
```
----------------------------------------------------------------
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]