Github user cloud-fan commented on a diff in the pull request: https://github.com/apache/spark/pull/17394#discussion_r109285879 --- Diff: sql/core/src/test/resources/sql-tests/results/describe.sql.out --- @@ -1,205 +1,248 @@ -- Automatically generated by SQLQueryTestSuite --- Number of queries: 14 +-- Number of queries: 28 -- !query 0 -CREATE TABLE t (a STRING, b INT, c STRING, d STRING) USING parquet PARTITIONED BY (c, d) COMMENT 'table_comment' +CREATE TABLE t (a STRING, b INT, c STRING, d STRING) USING parquet + PARTITIONED BY (c, d) CLUSTERED BY (a) SORTED BY (b ASC) INTO 2 BUCKETS + COMMENT 'table_comment' -- !query 0 schema struct<> -- !query 0 output -- !query 1 -ALTER TABLE t ADD PARTITION (c='Us', d=1) +CREATE TEMPORARY VIEW temp_v AS SELECT * FROM t -- !query 1 schema struct<> -- !query 1 output -- !query 2 -DESCRIBE t +CREATE VIEW v AS SELECT * FROM t -- !query 2 schema -struct<col_name:string,data_type:string,comment:string> +struct<> -- !query 2 output -# Partition Information -# col_name data_type comment -a string -b int -c string -c string -d string -d string + -- !query 3 -DESC t +ALTER TABLE t ADD PARTITION (c='Us', d=1) -- !query 3 schema -struct<col_name:string,data_type:string,comment:string> +struct<> -- !query 3 output -# Partition Information -# col_name data_type comment -a string -b int -c string -c string -d string -d string + -- !query 4 -DESC TABLE t +DESCRIBE t -- !query 4 schema struct<col_name:string,data_type:string,comment:string> -- !query 4 output -# Partition Information -# col_name data_type comment a string b int c string -c string d string +# Partition Information +# col_name data_type comment +c string d string -- !query 5 -DESC FORMATTED t +DESC t -- !query 5 schema struct<col_name:string,data_type:string,comment:string> -- !query 5 output -# Detailed Table Information -# Partition Information -# Storage Information -# col_name data_type comment -Comment: table_comment -Compressed: No -Created: -Database: default -Last Access: -Location: sql/core/spark-warehouse/t -Owner: -Partition Provider: Catalog -Storage Desc Parameters: -Table Parameters: -Table Type: MANAGED a string b int c string -c string d string +# Partition Information +# col_name data_type comment +c string d string -- !query 6 -DESC EXTENDED t +DESC TABLE t -- !query 6 schema struct<col_name:string,data_type:string,comment:string> -- !query 6 output -# Detailed Table Information CatalogTable( - Table: `default`.`t` - Created: - Last Access: - Type: MANAGED - Schema: [StructField(a,StringType,true), StructField(b,IntegerType,true), StructField(c,StringType,true), StructField(d,StringType,true)] - Provider: parquet - Partition Columns: [`c`, `d`] - Comment: table_comment - Storage(Location: sql/core/spark-warehouse/t) - Partition Provider: Catalog) -# Partition Information -# col_name data_type comment a string b int c string -c string d string +# Partition Information +# col_name data_type comment +c string d string -- !query 7 -DESC t PARTITION (c='Us', d=1) +DESC FORMATTED t -- !query 7 schema struct<col_name:string,data_type:string,comment:string> -- !query 7 output -# Partition Information -# col_name data_type comment a string b int c string +d string +# Partition Information +# col_name data_type comment c string d string -d string + +# Detailed Table Information +Table `default`.`t` +Created[removed by SQLQueryTestSuite] +Last Access[removed by SQLQueryTestSuite] +Type MANAGED +Provider parquet +Num Buckets 2 +Bucket Columns [`a`] +Sort Columns [`b`] +Comment table_comment +Location[removed by SQLQueryTestSuite]sql/core/spark-warehouse/t +Partition Provider Catalog +Partition Columns [`c`, `d`] +Schema root + |-- a: string (nullable = true) + |-- b: integer (nullable = true) + |-- c: string (nullable = true) + |-- d: string (nullable = true) -- !query 8 -DESC EXTENDED t PARTITION (c='Us', d=1) +DESC EXTENDED t -- !query 8 schema struct<col_name:string,data_type:string,comment:string> -- !query 8 output -# Partition Information -# col_name data_type comment -Detailed Partition Information CatalogPartition( - Partition Values: [c=Us, d=1] - Storage(Location: sql/core/spark-warehouse/t/c=Us/d=1) - Partition Parameters:{}) a string b int c string +d string +# Partition Information +# col_name data_type comment c string d string -d string + +# Detailed Table Information +Table `default`.`t` +Created[removed by SQLQueryTestSuite] +Last Access[removed by SQLQueryTestSuite] +Type MANAGED +Provider parquet +Num Buckets 2 +Bucket Columns [`a`] +Sort Columns [`b`] +Comment table_comment +Location[removed by SQLQueryTestSuite]sql/core/spark-warehouse/t +Partition Provider Catalog +Partition Columns [`c`, `d`] +Schema root + |-- a: string (nullable = true) + |-- b: integer (nullable = true) + |-- c: string (nullable = true) + |-- d: string (nullable = true) -- !query 9 -DESC FORMATTED t PARTITION (c='Us', d=1) +DESC t PARTITION (c='Us', d=1) -- !query 9 schema struct<col_name:string,data_type:string,comment:string> -- !query 9 output -# Detailed Partition Information +a string +b int +c string +d string # Partition Information -# Storage Information # col_name data_type comment -Compressed: No -Database: default -Location: sql/core/spark-warehouse/t/c=Us/d=1 -Partition Parameters: -Partition Value: [Us, 1] -Storage Desc Parameters: -Table: t +c string +d string + + +-- !query 10 +DESC EXTENDED t PARTITION (c='Us', d=1) +-- !query 10 schema +struct<col_name:string,data_type:string,comment:string> +-- !query 10 output a string b int c string +d string +# Partition Information +# col_name data_type comment c string d string -d string + +# Detailed Partition Information +Database default +Table t --- End diff -- not related to this PR, but why do we put the `Database` and `Table` in `# Detailed Partition Information`? Did we follow hive?
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org