yadavay-amzn commented on code in PR #56472:
URL: https://github.com/apache/spark/pull/56472#discussion_r3422893440
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/ResolveTableSpec.scala:
##########
@@ -95,6 +95,18 @@ object ResolveTableSpec extends Rule[LogicalPlan] {
messageParameters = Map("checkCondition" -> check.condition)
)
}
+ // Spark currently only supports session/temporary SQL variables
+ // (TempVariableManager); every VariableReference is therefore
session-scoped and
+ // invalid in a persisted CHECK constraint. If persistent SQL
variables are added
+ // later, tighten this to fire only on session-scoped variables.
+ check.child.foreach {
Review Comment:
Switched both call sites to `child.collectFirst` style
--
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]