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


##########
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:
   This conf is no longer present after the Spark 4.1 refactor. I had to change 
the implementation. Also, as agreed, I am raising an exception if both 
session-level and table-level configs are present at the same time.



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