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


##########
spark/v3.3/spark/src/main/java/org/apache/iceberg/spark/source/SparkScanBuilder.java:
##########
@@ -98,17 +98,27 @@
   private Filter[] pushedFilters = NO_FILTERS;
 
   SparkScanBuilder(
-      SparkSession spark, Table table, Schema schema, CaseInsensitiveStringMap 
options) {
+      SparkSession spark,
+      Table table,
+      String branch,
+      Schema schema,
+      CaseInsensitiveStringMap options) {
     this.spark = spark;
     this.table = table;
     this.schema = schema;
     this.options = options;
-    this.readConf = new SparkReadConf(spark, table, options);
+    this.readConf = new SparkReadConf(spark, table, branch, options);
     this.caseSensitive = readConf.caseSensitive();
   }
 
-  SparkScanBuilder(SparkSession spark, Table table, CaseInsensitiveStringMap 
options) {
-    this(spark, table, table.schema(), options);
+  SparkScanBuilder(
+      SparkSession spark, Table table, String branch, CaseInsensitiveStringMap 
options) {
+    this(spark, table, branch, SnapshotUtil.schemaFor(table, branch), options);
+  }
+
+  SparkScanBuilder(

Review Comment:
   Is it possible to avoid needing to cast `(String) null` in tests? Maybe one 
of these could be private?



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