From 617915be63493e1228969df7e7b6f7d81a515a1a Mon Sep 17 00:00:00 2001 From: Terry Kim Date: Mon, 19 Feb 2024 18:09:04 -0800 Subject: [PATCH] add nested column --- .../sql/execution/command/DescribeTableSuiteBase.scala | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/DescribeTableSuiteBase.scala b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/DescribeTableSuiteBase.scala index a435f9e0805f9..c80cedca29f7c 100644 --- a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/DescribeTableSuiteBase.scala +++ b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/DescribeTableSuiteBase.scala @@ -181,10 +181,9 @@ trait DescribeTableSuiteBase extends QueryTest with DDLCommandTestUtils { test("describe a clustered table") { withNamespaceAndTable("ns", "tbl") { tbl => - sql(s"CREATE TABLE $tbl (col1 STRING COMMENT 'this is comment', col2 INT) " + - s"$defaultUsing CLUSTER BY (col1, col2)") + sql(s"CREATE TABLE $tbl (col1 STRING COMMENT 'this is comment', col2 struct) " + + s"$defaultUsing CLUSTER BY (col1, col2.x)") val descriptionDf = sql(s"DESC $tbl") - descriptionDf.show(false) assert(descriptionDf.schema.map(field => (field.name, field.dataType)) === Seq( ("col_name", StringType), ("data_type", StringType), @@ -193,11 +192,11 @@ trait DescribeTableSuiteBase extends QueryTest with DDLCommandTestUtils { descriptionDf, Seq( Row("col1", "string", "this is comment"), - Row("col2", "int", null), + Row("col2", "struct", null), Row("# Clustering Information", "", ""), Row("# col_name", "data_type", "comment"), Row("col1", "string", "this is comment"), - Row("col2", "int", null))) + Row("col2.x", "int", null))) } } }