aokolnychyi commented on code in PR #50839:
URL: https://github.com/apache/spark/pull/50839#discussion_r2087153562
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/constraints.scala:
##########
@@ -129,15 +129,13 @@ case class CheckConstraint(
val predicate = new V2ExpressionBuilder(child,
true).buildPredicate().orNull
val enforced = userProvidedCharacteristic.enforced.getOrElse(true)
val rely = userProvidedCharacteristic.rely.getOrElse(false)
- // TODO(SPARK-51903): Change the status to VALIDATED when we support
validation on ALTER TABLE
- val validateStatus = Constraint.ValidationStatus.UNVALIDATED
Constraint
.check(name)
.predicateSql(condition)
.predicate(predicate)
.rely(rely)
.enforced(enforced)
- .validationStatus(validateStatus)
+ .validationStatus(Constraint.ValidationStatus.VALID)
Review Comment:
This change is safe because it is technically true in create/replace and
CTAS/RTAS?
--
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]