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


##########
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:
   While I think it is better not to call `useRef` in the Spark code, it is not 
an option to always call `useRef` here.
   
   It is critical that tests exercise paths that do not call that method.



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

Reply via email to