Skip to content

Commit ec574ff

Browse files
committed
Update describe.sql, too.
1 parent e3d2faf commit ec574ff

File tree

2 files changed

+59
-14
lines changed

2 files changed

+59
-14
lines changed

sql/core/src/test/resources/sql-tests/inputs/describe.sql

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,17 @@ ALTER TABLE t ADD PARTITION (c='Us', d=1);
44

55
DESC t;
66

7-
-- Ignore these because there exists timestamp results like `create_table`
7+
-- Ignore these because there exists timestamp results, e.g., `Create Table`
88
-- DESC EXTENDED t;
99
-- DESC FORMATTED t;
1010

1111
DESC t PARTITION (c='Us', d=1);
1212

13-
-- Ignore these because there exists timestamp results like `create_table`
14-
-- DESC EXTENDED t PARTITION (c='Us', d=1);
15-
-- DESC FORMATTED t PARTITION (c='Us', d=1);
13+
DESC EXTENDED t PARTITION (c='Us', d=1);
1614

17-
-- NoSuchPartitionException: Partition not found in table 'partitioned_table'
15+
DESC FORMATTED t PARTITION (c='Us', d=1);
16+
17+
-- NoSuchPartitionException: Partition not found in table
1818
DESC t PARTITION (c='Us', d=2);
1919

2020
-- AnalysisException: Partition spec is invalid

sql/core/src/test/resources/sql-tests/results/describe.sql.out

Lines changed: 54 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
-- Automatically generated by SQLQueryTestSuite
2-
-- Number of queries: 7
2+
-- Number of queries: 9
33

44

55
-- !query 0
@@ -49,30 +49,75 @@ d string
4949

5050

5151
-- !query 4
52-
DESC t PARTITION (c='Us', d=2)
52+
DESC EXTENDED t PARTITION (c='Us', d=1)
5353
-- !query 4 schema
54-
struct<>
54+
struct<col_name:string,data_type:string,comment:string>
5555
-- !query 4 output
56+
# Partition Information
57+
# col_name data_type comment
58+
Detailed Partition Information CatalogPartition(
59+
Partition Values: [Us, 1]
60+
Storage(InputFormat: org.apache.hadoop.mapred.TextInputFormat, OutputFormat: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat)
61+
Partition Parameters:{})
62+
a string
63+
b int
64+
c string
65+
c string
66+
d string
67+
d string
68+
69+
70+
-- !query 5
71+
DESC FORMATTED t PARTITION (c='Us', d=1)
72+
-- !query 5 schema
73+
struct<col_name:string,data_type:string,comment:string>
74+
-- !query 5 output
75+
# Detailed Partition Information
76+
# Partition Information
77+
# Storage Information
78+
# col_name data_type comment
79+
Compressed: No
80+
Database: default
81+
InputFormat: org.apache.hadoop.mapred.TextInputFormat
82+
Location:
83+
OutputFormat: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
84+
Partition Parameters:
85+
Partition Value: [Us, 1]
86+
Storage Desc Parameters:
87+
Table: t
88+
a string
89+
b int
90+
c string
91+
c string
92+
d string
93+
d string
94+
95+
96+
-- !query 6
97+
DESC t PARTITION (c='Us', d=2)
98+
-- !query 6 schema
99+
struct<>
100+
-- !query 6 output
56101
org.apache.spark.sql.catalyst.analysis.NoSuchPartitionException
57102
Partition not found in table 't' database 'default':
58103
c -> Us
59104
d -> 2;
60105

61106

62-
-- !query 5
107+
-- !query 7
63108
DESC t PARTITION (c='Us')
64-
-- !query 5 schema
109+
-- !query 7 schema
65110
struct<>
66-
-- !query 5 output
111+
-- !query 7 output
67112
org.apache.spark.sql.AnalysisException
68113
Partition spec is invalid. The spec (c) must match the partition spec (c, d) defined in table '`default`.`t`';
69114

70115

71-
-- !query 6
116+
-- !query 8
72117
DESC t PARTITION (c='Us', d)
73-
-- !query 6 schema
118+
-- !query 8 schema
74119
struct<>
75-
-- !query 6 output
120+
-- !query 8 output
76121
org.apache.spark.sql.catalyst.parser.ParseException
77122

78123
Unsupported SQL statement

0 commit comments

Comments
 (0)