aokolnychyi commented on code in PR #10200: URL: https://github.com/apache/iceberg/pull/10200#discussion_r1577029896
########## core/src/main/java/org/apache/iceberg/io/BaseTaskWriter.java: ########## @@ -109,18 +112,30 @@ protected abstract class BaseEqualityDeltaWriter implements Closeable { private final StructProjection structProjection; private RollingFileWriter dataWriter; private RollingEqDeleteWriter eqDeleteWriter; - private SortedPosDeleteWriter<T> posDeleteWriter; + private FileWriter<PositionDelete<T>, DeleteWriteResult> posDeleteWriter; private Map<StructLike, PathOffset> insertedRowMap; protected BaseEqualityDeltaWriter(StructLike partition, Schema schema, Schema deleteSchema) { + this(partition, schema, deleteSchema, DeleteGranularity.PARTITION); + } + + protected BaseEqualityDeltaWriter( + StructLike partition, + Schema schema, + Schema deleteSchema, + DeleteGranularity deleteGranularity) { Preconditions.checkNotNull(schema, "Iceberg table schema cannot be null."); Preconditions.checkNotNull(deleteSchema, "Equality-delete schema cannot be null."); this.structProjection = StructProjection.create(schema, deleteSchema); this.dataWriter = new RollingFileWriter(partition); this.eqDeleteWriter = new RollingEqDeleteWriter(partition); this.posDeleteWriter = - new SortedPosDeleteWriter<>(appenderFactory, fileFactory, format, partition); + deleteGranularity.equals(DeleteGranularity.FILE) Review Comment: Is there a use case where we want to use partition granularity? Based on our initial discussions, we wanted to always use file granularity in Flink. -- 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: issues-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org