ShreelekhyaG commented on a change in pull request #4113:
URL: https://github.com/apache/carbondata/pull/4113#discussion_r613799287



##########
File path: 
integration/spark/src/main/scala/org/apache/spark/sql/execution/command/table/CarbonDescribeFormattedCommand.scala
##########
@@ -370,3 +374,147 @@ private[sql] case class CarbonDescribeFormattedCommand(
 
   override protected def opName: String = "DESC FORMATTED"
 }
+
+case class CarbonDescribeColumnCommand(
+    databaseNameOp: Option[String],
+    tableName: String,
+    inputFieldNames: java.util.List[String])
+  extends MetadataCommand {
+
+  override val output: Seq[Attribute] = Seq(
+    // Column names are based on Hive.
+    AttributeReference("col_name", StringType, nullable = false,
+      new MetadataBuilder().putString("comment", "name of the 
column").build())(),
+    AttributeReference("data_type", StringType, nullable = false,
+      new MetadataBuilder().putString("comment", "data type of the 
column").build())(),
+    AttributeReference("comment", StringType, nullable = true,
+      new MetadataBuilder().putString("comment", "comment of the 
column").build())()
+  )
+
+  override def processMetadata(sparkSession: SparkSession): Seq[Row] = {
+    val (tableSchema, carbonTable) = Checker.getSchemaAndTable(databaseNameOp, 
tableName)

Review comment:
       Done

##########
File path: docs/ddl-of-carbondata.md
##########
@@ -646,6 +647,68 @@ CarbonData DDL statements are documented here,which 
includes:
 
 ## TABLE MANAGEMENT  
 
+### DESCRIBE COMMAND
+
+Describe column of table and visualize its structure with child fields.

Review comment:
       Done




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


Reply via email to