public static RowData clonePhysical(
            RowData from, RowData reuse, RowType rowType, TypeSerializer[] fieldSerializers) {
        GenericRowData ret;
        if (reuse instanceof GenericRowData) {
            ret = (GenericRowData) reuse;
        } else {
            ret = new GenericRowData(from.getArity());
        }
        ret.setRowKind(from.getRowKind());
        for (int i = 0; i < rowType.getFieldCount(); i++) {
            if (!from.isNullAt(i)) {
                RowData.FieldGetter getter = RowData.createFieldGetter(rowType.getTypeAt(i), i);
                ret.setField(i, fieldSerializers[i].copy(getter.getFieldOrNull(from)));
            } else {
                ret.setField(i, null);
            }
        }
        return ret;
    }
Support clone meta and physical RowData.
inlong-sort/sort-flink/sort-flink-v1.15/sort-connectors/iceberg/src/main/java/org/apache/inlong/sort/iceberg/utils/RowDataCloneUtil.java