cloud-fan commented on code in PR #47403:
URL: https://github.com/apache/spark/pull/47403#discussion_r1689275665


##########
sql/core/src/main/scala/org/apache/spark/sql/scripting/SqlScriptingInterpreter.scala:
##########
@@ -73,11 +74,19 @@ case class SqlScriptingInterpreter() {
           .map(new SingleStatementExec(_, Origin(), isInternal = true))
           .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)
+          shouldCollectResult = true)
     }
+
+  def execute(compoundBody: CompoundBody): Iterator[Array[Row]] = {

Review Comment:
   I'm OK with a simple implementation (collect all the result rows) as a 
beginning, but we should build the basic framework with proper abstraction, 
otherwise I don't know how to review it. The idea of `handlers` makes sense.



-- 
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

Reply via email to