aboutsummaryrefslogtreecommitdiff
path: root/sql/core/src/test/resources/sql-tests/results/describe.sql.out
diff options
context:
space:
mode:
Diffstat (limited to 'sql/core/src/test/resources/sql-tests/results/describe.sql.out')
-rw-r--r--sql/core/src/test/resources/sql-tests/results/describe.sql.out422
1 files changed, 330 insertions, 92 deletions
diff --git a/sql/core/src/test/resources/sql-tests/results/describe.sql.out b/sql/core/src/test/resources/sql-tests/results/describe.sql.out
index 422d548ea8..de10b29f3c 100644
--- a/sql/core/src/test/resources/sql-tests/results/describe.sql.out
+++ b/sql/core/src/test/resources/sql-tests/results/describe.sql.out
@@ -1,9 +1,11 @@
-- Automatically generated by SQLQueryTestSuite
--- Number of queries: 14
+-- Number of queries: 31
-- !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
@@ -11,7 +13,7 @@ struct<>
-- !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
@@ -19,187 +21,239 @@ struct<>
-- !query 2
-DESCRIBE t
+CREATE TEMPORARY VIEW temp_Data_Source_View
+ USING org.apache.spark.sql.sources.DDLScanSource
+ OPTIONS (
+ From '1',
+ To '10',
+ Table 'test1')
-- !query 2 schema
-struct<col_name:string,data_type:string,comment:string>
+struct<>
-- !query 2 output
-# Partition Information
+
+
+
+-- !query 3
+CREATE VIEW v AS SELECT * FROM t
+-- !query 3 schema
+struct<>
+-- !query 3 output
+
+
+
+-- !query 4
+ALTER TABLE t ADD PARTITION (c='Us', d=1)
+-- !query 4 schema
+struct<>
+-- !query 4 output
+
+
+
+-- !query 5
+DESCRIBE t
+-- !query 5 schema
+struct<col_name:string,data_type:string,comment:string>
+-- !query 5 output
# 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 3
-DESC t
--- !query 3 schema
+-- !query 6
+DESC default.t
+-- !query 6 schema
struct<col_name:string,data_type:string,comment:string>
--- !query 3 output
-# Partition Information
+-- !query 6 output
# 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 4
+-- !query 7
DESC TABLE t
--- !query 4 schema
+-- !query 7 schema
struct<col_name:string,data_type:string,comment:string>
--- !query 4 output
-# Partition Information
+-- !query 7 output
# 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
+-- !query 8
DESC FORMATTED t
--- !query 5 schema
+-- !query 8 schema
struct<col_name:string,data_type:string,comment:string>
--- !query 5 output
-# Detailed Table Information
-# Partition Information
-# Storage Information
+-- !query 8 output
# 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
+d string
+# Partition Information
+# col_name data_type comment
c string
d string
-d string
+
+# Detailed Table Information
+Database default
+Table t
+Created [not included in comparison]
+Last Access [not included in comparison]
+Type MANAGED
+Provider parquet
+Num Buckets 2
+Bucket Columns [`a`]
+Sort Columns [`b`]
+Comment table_comment
+Location [not included in comparison]sql/core/spark-warehouse/t
+Partition Provider Catalog
--- !query 6
+-- !query 9
DESC EXTENDED t
--- !query 6 schema
+-- !query 9 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
+-- !query 9 output
# 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
+Database default
+Table t
+Created [not included in comparison]
+Last Access [not included in comparison]
+Type MANAGED
+Provider parquet
+Num Buckets 2
+Bucket Columns [`a`]
+Sort Columns [`b`]
+Comment table_comment
+Location [not included in comparison]sql/core/spark-warehouse/t
+Partition Provider Catalog
--- !query 7
+-- !query 10
DESC t PARTITION (c='Us', d=1)
--- !query 7 schema
+-- !query 10 schema
struct<col_name:string,data_type:string,comment:string>
--- !query 7 output
-# Partition Information
+-- !query 10 output
# 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 8
+-- !query 11
DESC EXTENDED t PARTITION (c='Us', d=1)
--- !query 8 schema
+-- !query 11 schema
struct<col_name:string,data_type:string,comment:string>
--- !query 8 output
-# Partition Information
+-- !query 11 output
# 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 Partition Information
+Database default
+Table t
+Partition Values [c=Us, d=1]
+Location [not included in comparison]sql/core/spark-warehouse/t/c=Us/d=1
+
+# Storage Information
+Num Buckets 2
+Bucket Columns [`a`]
+Sort Columns [`b`]
+Location [not included in comparison]sql/core/spark-warehouse/t
--- !query 9
+-- !query 12
DESC FORMATTED t PARTITION (c='Us', d=1)
--- !query 9 schema
+-- !query 12 schema
struct<col_name:string,data_type:string,comment:string>
--- !query 9 output
-# Detailed Partition Information
-# Partition Information
-# Storage Information
+-- !query 12 output
# 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
+d string
+# Partition Information
+# col_name data_type comment
c string
d string
-d string
+
+# Detailed Partition Information
+Database default
+Table t
+Partition Values [c=Us, d=1]
+Location [not included in comparison]sql/core/spark-warehouse/t/c=Us/d=1
+
+# Storage Information
+Num Buckets 2
+Bucket Columns [`a`]
+Sort Columns [`b`]
+Location [not included in comparison]sql/core/spark-warehouse/t
--- !query 10
+-- !query 13
DESC t PARTITION (c='Us', d=2)
--- !query 10 schema
+-- !query 13 schema
struct<>
--- !query 10 output
+-- !query 13 output
org.apache.spark.sql.catalyst.analysis.NoSuchPartitionException
Partition not found in table 't' database 'default':
c -> Us
d -> 2;
--- !query 11
+-- !query 14
DESC t PARTITION (c='Us')
--- !query 11 schema
+-- !query 14 schema
struct<>
--- !query 11 output
+-- !query 14 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
+-- !query 15
DESC t PARTITION (c='Us', d)
--- !query 12 schema
+-- !query 15 schema
struct<>
--- !query 12 output
+-- !query 15 output
org.apache.spark.sql.catalyst.parser.ParseException
PARTITION specification is incomplete: `d`(line 1, pos 0)
@@ -209,9 +263,193 @@ DESC t PARTITION (c='Us', d)
^^^
--- !query 13
+-- !query 16
+DESC temp_v
+-- !query 16 schema
+struct<col_name:string,data_type:string,comment:string>
+-- !query 16 output
+# col_name data_type comment
+a string
+b int
+c string
+d string
+
+
+-- !query 17
+DESC TABLE temp_v
+-- !query 17 schema
+struct<col_name:string,data_type:string,comment:string>
+-- !query 17 output
+# col_name data_type comment
+a string
+b int
+c string
+d string
+
+
+-- !query 18
+DESC FORMATTED temp_v
+-- !query 18 schema
+struct<col_name:string,data_type:string,comment:string>
+-- !query 18 output
+# col_name data_type comment
+a string
+b int
+c string
+d string
+
+
+-- !query 19
+DESC EXTENDED temp_v
+-- !query 19 schema
+struct<col_name:string,data_type:string,comment:string>
+-- !query 19 output
+# col_name data_type comment
+a string
+b int
+c string
+d string
+
+
+-- !query 20
+DESC temp_Data_Source_View
+-- !query 20 schema
+struct<col_name:string,data_type:string,comment:string>
+-- !query 20 output
+# col_name data_type comment
+intType int test comment test1
+stringType string
+dateType date
+timestampType timestamp
+doubleType double
+bigintType bigint
+tinyintType tinyint
+decimalType decimal(10,0)
+fixedDecimalType decimal(5,1)
+binaryType binary
+booleanType boolean
+smallIntType smallint
+floatType float
+mapType map<string,string>
+arrayType array<string>
+structType struct<f1:string,f2:int>
+
+
+-- !query 21
+DESC temp_v PARTITION (c='Us', d=1)
+-- !query 21 schema
+struct<>
+-- !query 21 output
+org.apache.spark.sql.AnalysisException
+DESC PARTITION is not allowed on a temporary view: temp_v;
+
+
+-- !query 22
+DESC v
+-- !query 22 schema
+struct<col_name:string,data_type:string,comment:string>
+-- !query 22 output
+# col_name data_type comment
+a string
+b int
+c string
+d string
+
+
+-- !query 23
+DESC TABLE v
+-- !query 23 schema
+struct<col_name:string,data_type:string,comment:string>
+-- !query 23 output
+# col_name data_type comment
+a string
+b int
+c string
+d string
+
+
+-- !query 24
+DESC FORMATTED v
+-- !query 24 schema
+struct<col_name:string,data_type:string,comment:string>
+-- !query 24 output
+# col_name data_type comment
+a string
+b int
+c string
+d string
+
+# Detailed Table Information
+Database default
+Table v
+Created [not included in comparison]
+Last Access [not included in comparison]
+Type VIEW
+View Text SELECT * FROM t
+View Default Database default
+View Query Output Columns [a, b, c, d]
+Properties [view.query.out.col.3=d, view.query.out.col.0=a, view.query.out.numCols=4, view.default.database=default, view.query.out.col.1=b, view.query.out.col.2=c]
+
+
+-- !query 25
+DESC EXTENDED v
+-- !query 25 schema
+struct<col_name:string,data_type:string,comment:string>
+-- !query 25 output
+# col_name data_type comment
+a string
+b int
+c string
+d string
+
+# Detailed Table Information
+Database default
+Table v
+Created [not included in comparison]
+Last Access [not included in comparison]
+Type VIEW
+View Text SELECT * FROM t
+View Default Database default
+View Query Output Columns [a, b, c, d]
+Properties [view.query.out.col.3=d, view.query.out.col.0=a, view.query.out.numCols=4, view.default.database=default, view.query.out.col.1=b, view.query.out.col.2=c]
+
+
+-- !query 26
+DESC v PARTITION (c='Us', d=1)
+-- !query 26 schema
+struct<>
+-- !query 26 output
+org.apache.spark.sql.AnalysisException
+DESC PARTITION is not allowed on a view: v;
+
+
+-- !query 27
DROP TABLE t
--- !query 13 schema
+-- !query 27 schema
struct<>
--- !query 13 output
+-- !query 27 output
+
+
+
+-- !query 28
+DROP VIEW temp_v
+-- !query 28 schema
+struct<>
+-- !query 28 output
+
+
+
+-- !query 29
+DROP VIEW temp_Data_Source_View
+-- !query 29 schema
+struct<>
+-- !query 29 output
+
+
+
+-- !query 30
+DROP VIEW v
+-- !query 30 schema
+struct<>
+-- !query 30 output