davidm-db commented on code in PR #49993: URL: https://github.com/apache/spark/pull/49993#discussion_r1961285872
########## sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/executeImmediate.scala: ########## @@ -106,7 +107,12 @@ class SubstituteExecuteImmediate(val catalogManager: CatalogManager) override def apply(plan: LogicalPlan): LogicalPlan = plan.resolveOperatorsWithPruning(_.containsPattern(EXECUTE_IMMEDIATE), ruleId) { - case ExecuteImmediateQuery(expressions, query, targetVariables) => + case e @ ExecuteImmediateQuery(expressions, _, _) if expressions.exists(!_.resolved) => + e.copy(args = resolveArguments(expressions)) + + case ExecuteImmediateQuery(expressions, query, targetVariables) + if expressions.forall(_.resolved) => Review Comment: isn't this always going to be `true`, considering that we didn't match the previous `case` at this point? -- 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: reviews-unsubscr...@spark.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org