amogh-jahagirdar commented on code in PR #9102:
URL: https://github.com/apache/iceberg/pull/9102#discussion_r1398494928


##########
spark/v3.5/spark/src/test/java/org/apache/iceberg/spark/data/TestHelpers.java:
##########
@@ -804,11 +805,7 @@ public static List<DataFile> dataFiles(Table table) {
   }
 
   public static List<DataFile> dataFiles(Table table, String branch) {
-    TableScan scan = table.newScan();
-    if (branch != null) {
-      scan.useRef(branch);
-    }
-
+    TableScan scan = table.newScan().useRef(branch != null ? branch : 
SnapshotRef.MAIN_BRANCH);

Review Comment:
   That's reasonable; I was mostly looking to just consolidate the code via 
useRef for both main and non-main cases, but it's important to make sure that 
we don't mask any issues in default table scan APIs. Removed the `useRef` calls 
for main.



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