zhangbutao commented on code in PR #4988: URL: https://github.com/apache/hive/pull/4988#discussion_r1449905840
########## iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/hive/writer/HiveIcebergRecordWriter.java: ########## @@ -41,9 +42,9 @@ class HiveIcebergRecordWriter extends HiveIcebergWriterBase { HiveIcebergRecordWriter(Schema schema, Map<Integer, PartitionSpec> specs, int currentSpecId, FileWriterFactory<Record> fileWriterFactory, OutputFileFactory fileFactory, FileIO io, - long targetFileSize) { - super(schema, specs, io, - new ClusteredDataWriter<>(fileWriterFactory, fileFactory, io, targetFileSize)); + long targetFileSize, boolean fanoutEnabled) { + super(schema, specs, io, fanoutEnabled ? new FanoutDataWriter<>(fileWriterFactory, fileFactory, io, targetFileSize) Review Comment: Nit: It would be better if we can use a separate function to extract&simplify this long code. -- 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: gitbox-unsubscr...@hive.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org For additional commands, e-mail: gitbox-h...@hive.apache.org