deniskuzZ commented on code in PR #5961: URL: https://github.com/apache/hive/pull/5961#discussion_r2223066286
########## iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/hive/writer/HiveIcebergWriterBase.java: ########## @@ -108,19 +115,53 @@ static PartitioningWriter<Record, DataWriteResult> newDataWriter( // use a fanout writer if the input is unordered no matter whether fanout writers are enabled // clustered writers assume that the position deletes are already ordered by file and position static PartitioningWriter<PositionDelete<Record>, DeleteWriteResult> newDeleteWriter( - Table table, HiveFileWriterFactory writers, OutputFileFactory files, Context context) { + Table table, Map<String, DeleteFileSet> rewritableDeletes, HiveFileWriterFactory writers, + OutputFileFactory files, Context context) { + Function<CharSequence, PositionDeleteIndex> previousDeleteLoader = + PreviousDeleteLoader.create(table, rewritableDeletes); FileIO io = table.io(); boolean inputOrdered = context.inputOrdered(); long targetFileSize = context.targetDeleteFileSize(); DeleteGranularity deleteGranularity = context.deleteGranularity(); - if (inputOrdered) { + if (context.useDVs()) { + return new PartitioningDVWriter<>(files, previousDeleteLoader); + } else if (inputOrdered && rewritableDeletes == null) { Review Comment: it's done the same way in SparkWriter -- 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