rdblue commented on a change in pull request #3132:
URL: https://github.com/apache/iceberg/pull/3132#discussion_r725395847



##########
File path: spark2/src/main/java/org/apache/iceberg/spark/source/Reader.java
##########
@@ -110,16 +110,16 @@
   Reader(SparkSession spark, Table table, boolean caseSensitive, 
DataSourceOptions options) {
     this.sparkContext = 
JavaSparkContext.fromSparkContext(spark.sparkContext());
     this.table = table;
-    this.options = options;
+    this.readConf = new SparkReadConf(spark, table, options.asMap());
     this.snapshotId = 
options.get(SparkReadOptions.SNAPSHOT_ID).map(Long::parseLong).orElse(null);
     this.asOfTimestamp = 
options.get(SparkReadOptions.AS_OF_TIMESTAMP).map(Long::parseLong).orElse(null);
     if (snapshotId != null && asOfTimestamp != null) {
       throw new IllegalArgumentException(
           "Cannot scan using both snapshot-id and as-of-timestamp to select 
the table snapshot");
     }
 
-    this.startSnapshotId = 
options.get("start-snapshot-id").map(Long::parseLong).orElse(null);
-    this.endSnapshotId = 
options.get("end-snapshot-id").map(Long::parseLong).orElse(null);
+    this.startSnapshotId = 
options.get(SparkReadOptions.START_SNAPSHOT_ID).map(Long::parseLong).orElse(null);
+    this.endSnapshotId = 
options.get(SparkReadOptions.END_SNAPSHOT_ID).map(Long::parseLong).orElse(null);

Review comment:
       I do think it would be cleaner with these in the read conf.




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