anuragmantri commented on code in PR #60392:
URL: https://github.com/apache/spark/pull/60392#discussion_r4592864675
##########
sql/core/src/main/scala/org/apache/spark/sql/catalyst/analysis/InvokeProcedures.scala:
##########
@@ -40,7 +40,7 @@ class InvokeProcedures(session: SparkSession) extends
Rule[LogicalPlan] {
private def invokeProcedures(plan: LogicalPlan): LogicalPlan = plan
resolveOperators {
case c: Call if c.resolved && c.bound && c.execute &&
c.checkArgTypes().isSuccess =>
session.sessionState.optimizer.execute(c) match {
- case Call(ResolvedProcedure(_, _, procedure: BoundProcedure), args, _)
=>
+ case Call(ResolvedBoundProcedure(_, _, procedure), args, _) =>
Review Comment:
Update: SPARK-61656 and SPARK-61669 fixed this on master, so no follow-up is
needed. The merge switches their patterns to `ResolvedBoundProcedure`.
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/PullOutNondeterministic.scala:
##########
@@ -36,6 +36,8 @@ object PullOutNondeterministic extends Rule[LogicalPlan] {
case p if !p.resolved => p // Skip unresolved nodes.
case p: Project => p
case f: Filter => f
+ // A CALL must keep its procedure as its child, which `Call.bound` and
`checkArgTypes` read.
+ case c: Call => c
Review Comment:
After SPARK-61669 the optimizer rules no longer need a `Call` exception.
What remains is keeping the resolved procedure out of `children`; I'll track
that in a JIRA.
--
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]