pvary commented on a change in pull request #2362:
URL: https://github.com/apache/iceberg/pull/2362#discussion_r603859471



##########
File path: spark3/src/main/java/org/apache/iceberg/spark/source/SparkWrite.java
##########
@@ -168,9 +177,9 @@ private boolean isWapTable() {
 
   // the writer factory works for both batch and streaming
   private WriterFactory createWriterFactory() {
-    return new WriterFactory(
-        table.spec(), format, table.locationProvider(), table.properties(), 
io, encryptionManager, targetFileSize,
-        writeSchema, dsSchema, partitionedFanoutEnabled);
+    // broadcast the table metadata as the writer factory will be sent to 
executors
+    Broadcast<Table> staticTable = 
lazySparkContext().broadcast(SparkUtil.toStaticTable(table));

Review comment:
       Not that I know off 😢 
   We pass these variables as part of the configuration object for the 
Mappers/Reducers separately.
   We are not yet on this level in the optimizations, but soon... 😄 




-- 
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.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to