zhztheplayer commented on code in PR #12647:
URL: https://github.com/apache/gluten/pull/12647#discussion_r4517249861


##########
backends-velox/src-delta33/main/scala/org/apache/spark/sql/delta/GlutenOptimisticTransaction.scala:
##########
@@ -91,53 +91,64 @@ class GlutenOptimisticTransaction(delegate: 
OptimisticTransaction)
 
       val empty2NullPlan =
         convertEmptyToNullIfNeeded(queryExecution.executedPlan, 
partitioningColumns, constraints)
-      val maybeCheckInvariants = if (constraints.isEmpty) {
+      val rowInvariantPlan = if (constraints.isEmpty) {
         // Compared to vanilla Delta, we simply avoid adding the invariant 
checker
         // when the constraint list is empty, to prevent the unnecessary 
transitions
         // from being added around the invariant checker.
         empty2NullPlan
       } else {
         DeltaInvariantCheckerExec(empty2NullPlan, constraints)
       }

Review Comment:
   Thanks for the explanation. I prefer a node over this approach but #13561 
might need to take some time to land. Do you think there's a way to keep a very 
small workaround just for this feature, to unwrap `GlutenException` into a 
`DeltaInvariantViolationException` by some heuristics? E.g., matching on the 
error message, etc?



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