dongjoon-hyun commented on code in PR #60007:
URL: https://github.com/apache/spark/pull/60007#discussion_r4447377263
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/ResolveTableSpec.scala:
##########
@@ -118,6 +118,14 @@ object ResolveTableSpec extends Rule[LogicalPlan] {
external = u.external,
constraints = u.constraints.map(_.toV2Constraint))
withNewSpec(newTableSpec)
+ // `ResolveSubquery` skips these commands, so a subquery in an option
value never resolves.
+ case u: UnresolvedTableSpec =>
Review Comment:
Thank you. I merged it into the CHECK constraint case, so both subquery
checks run before `childrenResolved` under one comment. Now `(SELECT 1 AS x)`
fails without the internal error as the cause, and the error no longer depends
on the other options. For example, `('j' = raise_error('boom'), 'k' = (SELECT 1
AS x))` used to report `j` and now reports `k`. A subquery in a CHECK
constraint is still reported first.
--
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]