-- Automatically generated by SQLQueryTestSuite -- Number of queries: 14 -- !query 0 CREATE TABLE t (a STRING, b INT, c STRING, d STRING) USING parquet PARTITIONED BY (c, d) COMMENT 'table_comment' -- !query 0 schema struct<> -- !query 0 output -- !query 1 ALTER TABLE t ADD PARTITION (c='Us', d=1) -- !query 1 schema struct<> -- !query 1 output -- !query 2 DESCRIBE t -- !query 2 schema 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 -- !query 3 schema 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 -- !query 4 schema struct -- !query 4 output # Partition Information # col_name data_type comment a string b int c string c string d string d string -- !query 5 DESC FORMATTED t -- !query 5 schema struct -- !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 d string -- !query 6 DESC EXTENDED t -- !query 6 schema struct -- !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 d string -- !query 7 DESC t PARTITION (c='Us', d=1) -- !query 7 schema struct -- !query 7 output # Partition Information # col_name data_type comment a string b int c string c string d string d string -- !query 8 DESC EXTENDED t PARTITION (c='Us', d=1) -- !query 8 schema struct -- !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 c string d string d string -- !query 9 DESC FORMATTED t PARTITION (c='Us', d=1) -- !query 9 schema struct -- !query 9 output # Detailed Partition Information # 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 a string b int c string c string d string d string -- !query 10 DESC t PARTITION (c='Us', d=2) -- !query 10 schema struct<> -- !query 10 output org.apache.spark.sql.catalyst.analysis.NoSuchPartitionException Partition not found in table 't' database 'default': c -> Us d -> 2; -- !query 11 DESC t PARTITION (c='Us') -- !query 11 schema struct<> -- !query 11 output org.apache.spark.sql.AnalysisException Partition spec is invalid. The spec (c) must match the partition spec (c, d) defined in table '`default`.`t`'; -- !query 12 DESC t PARTITION (c='Us', d) -- !query 12 schema struct<> -- !query 12 output org.apache.spark.sql.catalyst.parser.ParseException PARTITION specification is incomplete: `d`(line 1, pos 0) == SQL == DESC t PARTITION (c='Us', d) ^^^ -- !query 13 DROP TABLE t -- !query 13 schema struct<> -- !query 13 output