dilipbiswal commented on a change in pull request #23883: [SPARK-26982][SQL] 
Enhance describe framework to describe the output of a query.
URL: https://github.com/apache/spark/pull/23883#discussion_r261490182
 
 

 ##########
 File path: 
sql/core/src/main/scala/org/apache/spark/sql/execution/command/tables.scala
 ##########
 @@ -603,22 +621,22 @@ case class DescribeTableCommand(
     }
     table.storage.toLinkedHashMap.foreach(s => append(buffer, s._1, s._2, ""))
   }
+}
 
-  private def describeSchema(
-      schema: StructType,
-      buffer: ArrayBuffer[Row],
-      header: Boolean): Unit = {
-    if (header) {
-      append(buffer, s"# ${output.head.name}", output(1).name, output(2).name)
-    }
-    schema.foreach { column =>
-      append(buffer, column.name, column.dataType.simpleString, 
column.getComment().orNull)
-    }
-  }
+/**
+ * Command can of the following form.
+ * {{{
+ *   DESCRIBE [QUERY] query_statement
 
 Review comment:
   @dongjoon-hyun Now we support statements of the form : 
   1) SELECT
   2) SELECTS wrapped under a set op (union/intersect etc)
   3) VALUES(....)
   4) TABLE <tabName>
   Thats why i didn't use select_statement.. Any other name you can think of ?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to