viirya commented on code in PR #60460:
URL: https://github.com/apache/spark/pull/60460#discussion_r4568415941
##########
sql/core/src/main/scala/org/apache/spark/sql/catalyst/analysis/InvokeProcedures.scala:
##########
@@ -39,7 +39,10 @@ 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 =>
+ // A CALL with an IN or correlated EXISTS subquery in an argument is left
for CheckAnalysis to
+ // reject. The optimizer would rewrite the subquery into a join under the
`Call`.
+ case c: Call if c.resolved && c.bound && c.execute &&
c.checkArgTypes().isSuccess &&
+ !c.args.exists(SubqueryExpression.hasInOrCorrelatedExistsSubquery) =>
Review Comment:
Thanks, handling it in `InvokeProcedures` makes sense given
`ExtractPythonUDFs` too. In the follow-up, please keep the internal error as
the fallback for when the child changed but every argument still folds.
--
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]