amogh-jahagirdar commented on code in PR #11273: URL: https://github.com/apache/iceberg/pull/11273#discussion_r1799945980
########## spark/v3.5/spark/src/main/java/org/apache/iceberg/spark/source/SparkPositionDeltaWrite.java: ########## @@ -169,7 +174,13 @@ public DeltaWriterFactory createBatchWriterFactory(PhysicalWriteInfo info) { // broadcast the table metadata as the writer factory will be sent to executors Broadcast<Table> tableBroadcast = sparkContext.broadcast(SerializableTableWithSize.copyOf(table)); - return new PositionDeltaWriteFactory(tableBroadcast, command, context, writeProperties); + Broadcast<Map<String, DeleteFileSet>> rewritableDeletes = null; + if (context.deleteGranularity() == DeleteGranularity.FILE && scan != null) { + rewritableDeletes = sparkContext.broadcast(scan.rewritableDeletes()); Review Comment: Sorry I think I meant to address this from your earlier comment and mistakenly resolved it! ########## spark/v3.5/spark/src/main/java/org/apache/iceberg/spark/source/SparkPositionDeltaWrite.java: ########## @@ -169,7 +174,13 @@ public DeltaWriterFactory createBatchWriterFactory(PhysicalWriteInfo info) { // broadcast the table metadata as the writer factory will be sent to executors Broadcast<Table> tableBroadcast = sparkContext.broadcast(SerializableTableWithSize.copyOf(table)); - return new PositionDeltaWriteFactory(tableBroadcast, command, context, writeProperties); + Broadcast<Map<String, DeleteFileSet>> rewritableDeletes = null; + if (context.deleteGranularity() == DeleteGranularity.FILE && scan != null) { + rewritableDeletes = sparkContext.broadcast(scan.rewritableDeletes()); Review Comment: Will update -- 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