rdblue commented on code in PR #11982:
URL: https://github.com/apache/iceberg/pull/11982#discussion_r1925676836


##########
spark/v3.5/spark/src/main/java/org/apache/iceberg/spark/actions/RewriteTablePathSparkAction.java:
##########
@@ -728,4 +724,22 @@ private String getMetadataLocation(Table tbl) {
         !metadataDir.isEmpty(), "Failed to get the metadata file root 
directory");
     return metadataDir;
   }
+
+  @VisibleForTesting
+  Broadcast<Table> tableBroadcast() {
+    if (tblBroadcast == null) {
+      this.tblBroadcast = 
sparkContext().broadcast(SerializableTableWithSize.copyOf(table));
+    }
+
+    return tblBroadcast;
+  }
+
+  @VisibleForTesting
+  Broadcast<Map<Integer, PartitionSpec>> specsBroadcast(Map<Integer, 
PartitionSpec> specsById) {

Review Comment:
   Why broadcast this separately rather than using the specs [map from the 
`SerializableTable`](https://github.com/apache/iceberg/blob/main/core/src/main/java/org/apache/iceberg/SerializableTable.java#L208)?



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

Reply via email to