cloud-fan commented on a change in pull request #31968:
URL: https://github.com/apache/spark/pull/31968#discussion_r603073246
##########
File path:
sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/SparkSQLDriver.scala
##########
@@ -64,9 +64,15 @@ private[hive] class SparkSQLDriver(val context: SQLContext =
SparkSQLEnv.sqlCont
new VariableSubstitution().substitute(command)
}
context.sparkContext.setJobDescription(substitutorCommand)
- val execution =
context.sessionState.executePlan(context.sql(command).logicalPlan)
- hiveResponse = SQLExecution.withNewExecutionId(execution) {
+ val logicalPlan = context.sql(command).logicalPlan
Review comment:
So this is only a problem for thriftserver.
For normal spark application, people just do `sql("DROP TABLE t")` instead
of `sql("DROP TABLE t").collect()`. I think we should do the same here: if
`context.sql(command).qe.logicalPlan` is a `Command`, do not call
`hiveResultString`.
cc @yaooqinn
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]