jerryshao commented on a change in pull request #674: [WIP]Supports spark-3.0 
data source V2 APIs
URL: https://github.com/apache/incubator-iceberg/pull/674#discussion_r353593990
 
 

 ##########
 File path: 
spark/src/main/java/org/apache/iceberg/spark/source/IcebergBatchScan.java
 ##########
 @@ -115,61 +116,83 @@
   private StructType type = null; // cached because Spark accesses it multiple 
times
   private List<CombinedScanTask> tasks = null; // lazy cache of tasks
 
-  Reader(Table table, boolean caseSensitive, DataSourceOptions options) {
+  public IcebergBatchScan(Table table, Boolean caseSensitive, 
CaseInsensitiveStringMap options) {
     this.table = table;
-    this.snapshotId = 
options.get("snapshot-id").map(Long::parseLong).orElse(null);
-    this.asOfTimestamp = 
options.get("as-of-timestamp").map(Long::parseLong).orElse(null);
+    this.snapshotId = options.containsKey("snapshot-id") ? 
options.getLong("snapshot-id", 0) : null;
+    this.asOfTimestamp = options.containsKey("as-of-timestamp") ? 
options.getLong("as-of-timestamp", 0) : null;
 
 Review comment:
   why do we need to change here?

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to