Posted by
GitBox on
URL: http://apache-carbondata-dev-mailing-list-archive.168.s1.nabble.com/GitHub-carbondata-ShreelekhyaG-opened-a-new-pull-request-4113-WIP-Describe-complex-columns-tp107265p107388.html
Indhumathi27 commented on a change in pull request #4113:
URL:
https://github.com/apache/carbondata/pull/4113#discussion_r607534742##########
File path: integration/spark/src/test/scala/org/apache/carbondata/spark/testsuite/describeTable/TestDescribeTable.scala
##########
@@ -72,11 +84,131 @@ class TestDescribeTable extends QueryTest with BeforeAndAfterAll {
assert(descPar.exists(_.toString().contains("Partition Parameters:")))
}
+ test("test describe column field name") {
+ // describe primitive column
+ var desc = sql("describe column deviceInformationId on complexcarbontable").collect()
+ assert(desc(0).get(0).asInstanceOf[String].trim.equals("deviceInformationId"))
+ assert(desc(0).get(1).asInstanceOf[String].trim.equals("integer"))
+
+ // describe simple map
+ /*
+ +----------------------------+---------+-------+
+ |col_name |data_type|comment|
+ +----------------------------+---------+-------+
+ |channelsId |map |null |
+ |## Children of channelsId: | | |
+ |key |string |null |
+ |value |string |null |
+ +----------------------------+---------+-------+
+ */
+ desc = sql("describe column channelsId on complexcarbontable").collect()
Review comment:
Better to support short form of DESCRIBE also. DDL can be like [DESCRIBE|DESC] column <...>
--
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:
[hidden email]