bryanck commented on code in PR #15193:
URL: https://github.com/apache/iceberg/pull/15193#discussion_r2896414102


##########
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:
   I feel it is confusing to only apply the time travel session property under 
certain cases and could lead to unexpected results.



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