aokolnychyi commented on code in PR #6077:
URL: https://github.com/apache/iceberg/pull/6077#discussion_r1009584362


##########
spark/v3.3/spark/src/main/java/org/apache/iceberg/spark/source/SparkCopyOnWriteScan.java:
##########
@@ -102,6 +103,14 @@ public NamedReference[] filterAttributes() {
 
   @Override
   public void filter(Filter[] filters) {
+    Preconditions.checkState(
+        Objects.equals(snapshotId(), currentSnapshotId()),
+        "Runtime file filtering is not possible: the table has been 
concurrently refreshed. "

Review Comment:
   Well, it has to be modified and refreshed from one session. It is also ok if 
the table is modified using another query engine or job concurrently. 



##########
spark/v3.3/spark/src/main/java/org/apache/iceberg/spark/source/SparkCopyOnWriteScan.java:
##########
@@ -102,6 +103,14 @@ public NamedReference[] filterAttributes() {
 
   @Override
   public void filter(Filter[] filters) {
+    Preconditions.checkState(
+        Objects.equals(snapshotId(), currentSnapshotId()),
+        "Runtime file filtering is not possible: the table has been 
concurrently refreshed. "

Review Comment:
   Well, it has to be modified and refreshed from one session. It is also ok if 
the table is modified using another query engine or job concurrently. I'll try 
to reflect that.



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