szehon-ho commented on code in PR #5346:
URL: https://github.com/apache/iceberg/pull/5346#discussion_r936947297
##########
spark/v3.3/spark/src/main/java/org/apache/iceberg/spark/source/IcebergSource.java:
##########
@@ -122,8 +122,8 @@ private Spark3Util.CatalogAndIdentifier
catalogAndIdentifier(CaseInsensitiveStri
setupDefaultSparkCatalogs(spark);
String path = options.get(SparkReadOptions.PATH);
- Long snapshotId = propertyAsLong(options, SparkReadOptions.SNAPSHOT_ID);
- Long asOfTimestamp = propertyAsLong(options,
SparkReadOptions.AS_OF_TIMESTAMP);
+ Long snapshotId = PropertyUtil.propertyAsLong(options,
SparkReadOptions.SNAPSHOT_ID, -1);
+ Long asOfTimestamp = PropertyUtil.propertyAsLong(options,
SparkReadOptions.AS_OF_TIMESTAMP, -1);
Review Comment:
In this case you have to change the following code right to expect -1?
##########
spark/v3.3/spark/src/main/java/org/apache/iceberg/spark/source/IcebergSource.java:
##########
@@ -122,8 +122,8 @@ private Spark3Util.CatalogAndIdentifier
catalogAndIdentifier(CaseInsensitiveStri
setupDefaultSparkCatalogs(spark);
String path = options.get(SparkReadOptions.PATH);
- Long snapshotId = propertyAsLong(options, SparkReadOptions.SNAPSHOT_ID);
- Long asOfTimestamp = propertyAsLong(options,
SparkReadOptions.AS_OF_TIMESTAMP);
+ Long snapshotId = PropertyUtil.propertyAsLong(options,
SparkReadOptions.SNAPSHOT_ID, -1);
+ Long asOfTimestamp = PropertyUtil.propertyAsLong(options,
SparkReadOptions.AS_OF_TIMESTAMP, -1);
Review Comment:
In this case, dont we have to change the following code to expect -1?
--
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]