Guosmilesmile commented on code in PR #15596:
URL: https://github.com/apache/iceberg/pull/15596#discussion_r3212535951


##########
flink/v2.1/flink/src/main/java/org/apache/iceberg/flink/data/FlinkFormatModels.java:
##########
@@ -33,7 +34,9 @@ public static void register() {
             RowType.class,
             FlinkParquetWriters::buildWriter,
             (icebergSchema, fileSchema, engineSchema, idToConstant) ->
-                FlinkParquetReaders.buildReader(icebergSchema, fileSchema, 
idToConstant)));
+                FlinkParquetReaders.buildReader(icebergSchema, fileSchema, 
idToConstant),
+            new FlinkVariantShreddingAnalyzer(),
+            (row, rowType) -> new RowDataSerializer(rowType).copy(row)));

Review Comment:
   It will increase the cost, but without copying, there would be issues with 
data corruption when buffer data. We ran into this during early development, 
and the unit tests can reproduce it.



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