rdblue commented on code in PR #7637:
URL: https://github.com/apache/iceberg/pull/7637#discussion_r1199838768
##########
spark/v3.4/spark/src/main/java/org/apache/iceberg/spark/source/SparkPositionDeltaWrite.java:
##########
@@ -567,43 +562,16 @@ public void close() throws IOException {
}
}
- private PartitioningWriter<InternalRow, DataWriteResult> newInsertWriter(
- Table table,
- SparkFileWriterFactory writerFactory,
- OutputFileFactory fileFactory,
- Context context) {
- long targetFileSize = context.targetDataFileSize();
-
- if (table.spec().isPartitioned() && context.fanoutWriterEnabled()) {
- return new FanoutDataWriter<>(writerFactory, fileFactory, table.io(),
targetFileSize);
- } else {
- return new ClusteredDataWriter<>(writerFactory, fileFactory,
table.io(), targetFileSize);
- }
- }
-
- private PartitioningWriter<InternalRow, DataWriteResult> newUpdateWriter(
- Table table,
- SparkFileWriterFactory writerFactory,
- OutputFileFactory fileFactory,
- Context context) {
- long targetFileSize = context.targetDataFileSize();
-
- if (table.spec().isPartitioned()) {
- // use a fanout writer for partitioned tables to write updates as they
may be out of order
- return new FanoutDataWriter<>(writerFactory, fileFactory, table.io(),
targetFileSize);
- } else {
- return new ClusteredDataWriter<>(writerFactory, fileFactory,
table.io(), targetFileSize);
- }
+ private PartitioningWriter<InternalRow, DataWriteResult> newDataWriter(
Review Comment:
Can you help me understand why this no longer supports the explicit fanout
writer option?
I think it's because we are always adding a shuffle after the merge or
update anyway so it never matters?
--
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]