Github user andrewor14 commented on a diff in the pull request:
https://github.com/apache/spark/pull/13115#discussion_r66886807
--- Diff:
sql/core/src/main/scala/org/apache/spark/sql/execution/QueryExecution.scala ---
@@ -110,24 +110,29 @@ class QueryExecution(val sparkSession: SparkSession,
val logical: LogicalPlan) {
*/
def hiveResultString(): Seq[String] = executedPlan match {
case ExecutedCommandExec(desc: DescribeTableCommand) =>
- // If it is a describe command for a Hive table, we want to have the
output format
- // be similar with Hive.
- desc.run(sparkSession).map {
- case Row(name: String, dataType: String, comment) =>
- Seq(name, dataType,
- Option(comment.asInstanceOf[String]).getOrElse(""))
- .map(s => String.format(s"%-20s", s))
- .mkString("\t")
+ SQLExecution.withNewExecutionId(sparkSession, this) {
+ // If it is a describe command for a Hive table, we want to have
the output format
+ // be similar with Hive.
+ desc.run(sparkSession).map {
+ case Row(name: String, dataType: String, comment) =>
+ Seq(name, dataType,
+ Option(comment.asInstanceOf[String]).getOrElse(""))
+ .map(s => String.format(s"%-20s", s))
+ .mkString("\t")
+ }
}
case command: ExecutedCommandExec =>
- command.executeCollect().map(_.getString(0))
-
+ SQLExecution.withNewExecutionId(sparkSession, this) {
+ command.executeCollect().map(_.getString(0))
--- End diff --
not sure. It's probably fine
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]