aboutsummaryrefslogtreecommitdiff
path: root/sql/core/src/test/scala
diff options
context:
space:
mode:
authorWenchen Fan <wenchen@databricks.com>2016-07-26 18:46:12 +0800
committerCheng Lian <lian@databricks.com>2016-07-26 18:46:12 +0800
commita2abb583caaec9a2cecd5d65b05d172fc096c125 (patch)
treeedaf8913f4f586a85be22e728fc41bb7bbb8066f /sql/core/src/test/scala
parent4c9695598ee00f68aff4eb32d4629edf6facb29f (diff)
downloadspark-a2abb583caaec9a2cecd5d65b05d172fc096c125.tar.gz
spark-a2abb583caaec9a2cecd5d65b05d172fc096c125.tar.bz2
spark-a2abb583caaec9a2cecd5d65b05d172fc096c125.zip
[SPARK-16663][SQL] desc table should be consistent between data source and hive serde tables
## What changes were proposed in this pull request? Currently there are 2 inconsistence: 1. for data source table, we only print partition names, for hive table, we also print partition schema. After this PR, we will always print schema 2. if column doesn't have comment, data source table will print empty string, hive table will print null. After this PR, we will always print null ## How was this patch tested? new test in `HiveDDLSuite` Author: Wenchen Fan <wenchen@databricks.com> Closes #14302 from cloud-fan/minor3.
Diffstat (limited to 'sql/core/src/test/scala')
-rw-r--r--sql/core/src/test/scala/org/apache/spark/sql/sources/DDLTestSuite.scala30
1 files changed, 15 insertions, 15 deletions
diff --git a/sql/core/src/test/scala/org/apache/spark/sql/sources/DDLTestSuite.scala b/sql/core/src/test/scala/org/apache/spark/sql/sources/DDLTestSuite.scala
index d0ad3190e0..e535d4dc88 100644
--- a/sql/core/src/test/scala/org/apache/spark/sql/sources/DDLTestSuite.scala
+++ b/sql/core/src/test/scala/org/apache/spark/sql/sources/DDLTestSuite.scala
@@ -97,21 +97,21 @@ class DDLTestSuite extends DataSourceTest with SharedSQLContext {
"describe ddlPeople",
Seq(
Row("intType", "int", "test comment test1"),
- Row("stringType", "string", ""),
- Row("dateType", "date", ""),
- Row("timestampType", "timestamp", ""),
- Row("doubleType", "double", ""),
- Row("bigintType", "bigint", ""),
- Row("tinyintType", "tinyint", ""),
- Row("decimalType", "decimal(10,0)", ""),
- Row("fixedDecimalType", "decimal(5,1)", ""),
- Row("binaryType", "binary", ""),
- Row("booleanType", "boolean", ""),
- Row("smallIntType", "smallint", ""),
- Row("floatType", "float", ""),
- Row("mapType", "map<string,string>", ""),
- Row("arrayType", "array<string>", ""),
- Row("structType", "struct<f1:string,f2:int>", "")
+ Row("stringType", "string", null),
+ Row("dateType", "date", null),
+ Row("timestampType", "timestamp", null),
+ Row("doubleType", "double", null),
+ Row("bigintType", "bigint", null),
+ Row("tinyintType", "tinyint", null),
+ Row("decimalType", "decimal(10,0)", null),
+ Row("fixedDecimalType", "decimal(5,1)", null),
+ Row("binaryType", "binary", null),
+ Row("booleanType", "boolean", null),
+ Row("smallIntType", "smallint", null),
+ Row("floatType", "float", null),
+ Row("mapType", "map<string,string>", null),
+ Row("arrayType", "array<string>", null),
+ Row("structType", "struct<f1:string,f2:int>", null)
))
test("SPARK-7686 DescribeCommand should have correct physical plan output attributes") {