rdblue commented on code in PR #6651:
URL: https://github.com/apache/iceberg/pull/6651#discussion_r1115076278
##########
spark/v3.3/spark/src/test/java/org/apache/iceberg/spark/source/TestDataFrameWrites.java:
##########
@@ -204,15 +223,26 @@ private void writeAndValidateWithLocations(Table table,
File location, File expe
}
private List<Row> readTable(String location) {
- Dataset<Row> result = spark.read().format("iceberg").load(location);
+ return readTable(location, SnapshotRef.MAIN_BRANCH);
+ }
+
+ private List<Row> readTable(String location, String branch) {
+ Dataset<Row> result =
+ spark.read().format("iceberg").option(SparkReadOptions.BRANCH,
branch).load(location);
Review Comment:
Minor: In tests, I'd generally prefer not setting the branch option when we
intend to write to main. Otherwise we're not testing the default case. I know
that it is currently equivalent, but it seems like a gap that could eventually
introduce errors if all of our tests use a specific branch.
--
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]