aokolnychyi commented on code in PR #50561:
URL: https://github.com/apache/spark/pull/50561#discussion_r2040494480


##########
sql/catalyst/src/main/java/org/apache/spark/sql/connector/catalog/TableChange.java:
##########
@@ -787,4 +806,81 @@ public int hashCode() {
       return Arrays.hashCode(clusteringColumns);
     }
   }
+
+  /** A TableChange to alter table and add a constraint. */
+  final class AddConstraint implements TableChange {
+    private final Constraint constraint;
+    private final boolean validate;

Review Comment:
   The problem is that will construct a scan to do the validation. We need a 
way to pass which version of the table was validated back to the connector so 
that the connector can check changes that happened concurrently.



##########
sql/catalyst/src/main/java/org/apache/spark/sql/connector/catalog/TableChange.java:
##########
@@ -787,4 +806,81 @@ public int hashCode() {
       return Arrays.hashCode(clusteringColumns);
     }
   }
+
+  /** A TableChange to alter table and add a constraint. */
+  final class AddConstraint implements TableChange {
+    private final Constraint constraint;
+    private final boolean validate;

Review Comment:
   The problem is that Spark will construct a scan to do the validation. We 
need a way to pass which version of the table was validated back to the 
connector so that the connector can check changes that happened concurrently.



-- 
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: reviews-unsubscr...@spark.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to