aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/core/src/main/scala/org/apache/spark/sql/execution/command/tables.scala6
1 files changed, 2 insertions, 4 deletions
diff --git a/sql/core/src/main/scala/org/apache/spark/sql/execution/command/tables.scala b/sql/core/src/main/scala/org/apache/spark/sql/execution/command/tables.scala
index 6651c33a3a..6e52a4609a 100644
--- a/sql/core/src/main/scala/org/apache/spark/sql/execution/command/tables.scala
+++ b/sql/core/src/main/scala/org/apache/spark/sql/execution/command/tables.scala
@@ -622,9 +622,8 @@ case class ShowTablePropertiesCommand(table: TableIdentifier, propertyKey: Optio
* }}}
*/
case class ShowColumnsCommand(table: TableIdentifier) extends RunnableCommand {
- // The result of SHOW COLUMNS has one column called 'result'
override val output: Seq[Attribute] = {
- AttributeReference("result", StringType, nullable = false)() :: Nil
+ AttributeReference("col_name", StringType, nullable = false)() :: Nil
}
override def run(sparkSession: SparkSession): Seq[Row] = {
@@ -652,9 +651,8 @@ case class ShowColumnsCommand(table: TableIdentifier) extends RunnableCommand {
case class ShowPartitionsCommand(
table: TableIdentifier,
spec: Option[TablePartitionSpec]) extends RunnableCommand {
- // The result of SHOW PARTITIONS has one column called 'result'
override val output: Seq[Attribute] = {
- AttributeReference("result", StringType, nullable = false)() :: Nil
+ AttributeReference("partition", StringType, nullable = false)() :: Nil
}
private def getPartName(spec: TablePartitionSpec, partColNames: Seq[String]): String = {