davidm-db commented on code in PR #47403: URL: https://github.com/apache/spark/pull/47403#discussion_r1684284889
########## sql/core/src/main/scala/org/apache/spark/sql/scripting/SqlScriptingInterpreter.scala: ########## @@ -70,14 +71,22 @@ case class SqlScriptingInterpreter() { } val dropVariables = variables .map(varName => DropVariable(varName, ifExists = true)) - .map(new SingleStatementExec(_, Origin(), isInternal = true)) + .map(new SingleStatementExec(_, Origin(), isInternal = true, collectResult = false)) .reverse new CompoundBodyExec( - body.collection.map(st => transformTreeIntoExecutable(st)) ++ dropVariables) + body.collection.map(st => transformTreeIntoExecutable(st)) ++ dropVariables, session) case sparkStatement: SingleStatement => new SingleStatementExec( sparkStatement.parsedPlan, sparkStatement.origin, isInternal = false) } + + def execute(executionPlan: Iterator[CompoundStatementExec]): Iterator[Array[Row]] = { Review Comment: This probably means that we should change the tests a bit, we are simulating `execute` in the tests as well, because before we didn't have it in the interpreter. Now that we have it, we should probably change tests. Let's do what you said last for now, until other folks review the PR (leave this comment unresolved) and then we can figure if we want to change tests as well. -- 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