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


##########
parquet/src/main/java/org/apache/iceberg/parquet/ParquetFormatModel.java:
##########
@@ -51,7 +51,7 @@ public class ParquetFormatModel<D, S, R>
     extends BaseFormatModel<D, S, ParquetValueWriter<?>, R, MessageType> {
   private final boolean isBatchReader;
   private final VariantShreddingAnalyzer<D, S> variantAnalyzer;
-  private final UnaryOperator<D> copyFunc;
+  private final Function<S, UnaryOperator<D>> copyFuncFactory;

Review Comment:
   The previous version used `BiFunction`, which caused `RowDataSerializer` to 
be repeatedly created. To avoid this, we use `Function<S, UnaryOperator<D>>` 
instead, so that `RowDataSerializer` can be initialized once before 
`BufferedFileAppender` is created.



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