bryanck commented on code in PR #15193:
URL: https://github.com/apache/iceberg/pull/15193#discussion_r2896385502
##########
spark/v4.1/spark/src/main/java/org/apache/iceberg/spark/SparkReadConf.java:
##########
@@ -95,7 +95,12 @@ public Long snapshotId() {
}
public Long asOfTimestamp() {
- return
confParser.longConf().option(SparkReadOptions.AS_OF_TIMESTAMP).parseOptional();
+ SparkConfParser.LongConfParser longParser =
+ confParser.longConf().option(SparkReadOptions.AS_OF_TIMESTAMP);
+ if (snapshotId() == null && branch == null && tag() == null) {
+ longParser.sessionConf(SparkSQLProperties.AS_OF_TIMESTAMP);
+ }
+ return longParser.parseOptional();
Review Comment:
Is it possible to treat the session property the same as the read option,
like with other configs? e.g.
```
return confParser
.longConf()
.option(SparkReadOptions.AS_OF_TIMESTAMP)
.sessionConf(SparkSQLProperties.AS_OF_TIMESTAMP)
.parseOptional();
```
--
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]