97harsh commented on code in PR #14964:
URL: https://github.com/apache/iceberg/pull/14964#discussion_r2667595887


##########
spark/v4.1/spark/src/main/java/org/apache/iceberg/spark/procedures/RewriteDataFilesProcedure.java:
##########
@@ -114,11 +118,22 @@ public Iterator<Scan> call(InternalRow args) {
     String sortOrderString = input.asString(SORT_ORDER_PARAM, null);
     Map<String, String> options = input.asStringMap(OPTIONS_PARAM, 
ImmutableMap.of());
     String where = input.asString(WHERE_PARAM, null);
+    String explicitBranch = input.asString(BRANCH_PARAM, null);
+
+    // Load SparkTable to extract branch from identifier
+    SparkTable sparkTable = loadSparkTable(tableIdent);
+    String branchFromTable = sparkTable.branch();
+    String branch = explicitBranch != null ? explicitBranch : branchFromTable;
 
     return modifyIcebergTable(
         tableIdent,
         table -> {
-          RewriteDataFiles action = 
actions().rewriteDataFiles(table).options(options);
+          RewriteDataFilesSparkAction action =
+              (RewriteDataFilesSparkAction) 
actions().rewriteDataFiles(table).options(options);

Review Comment:
   remnant of a previous change



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