Skip to content

Commit ac3f351

Browse files
committed
migrate the test case
1 parent 68bb05c commit ac3f351

File tree

4 files changed

+255
-204
lines changed

4 files changed

+255
-204
lines changed

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

Lines changed: 38 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
1-
CREATE TABLE t (a STRING, b INT, c STRING, d STRING) USING parquet PARTITIONED BY (c, d) COMMENT 'table_comment';
1+
CREATE TABLE t (a STRING, b INT, c STRING, d STRING) USING parquet
2+
PARTITIONED BY (c, d) CLUSTERED BY (a) SORTED BY (b ASC) INTO 2 BUCKETS
3+
COMMENT 'table_comment';
4+
5+
CREATE TEMPORARY VIEW temp_v AS SELECT * FROM t;
6+
7+
CREATE VIEW v AS SELECT * FROM t;
28

39
ALTER TABLE t ADD PARTITION (c='Us', d=1);
410

@@ -27,5 +33,35 @@ DESC t PARTITION (c='Us');
2733
-- ParseException: PARTITION specification is incomplete
2834
DESC t PARTITION (c='Us', d);
2935

30-
-- DROP TEST TABLE
36+
-- DESC Temp View
37+
38+
DESC temp_v;
39+
40+
DESC TABLE temp_v;
41+
42+
DESC FORMATTED temp_v;
43+
44+
DESC EXTENDED temp_v;
45+
46+
-- AnalysisException DESC PARTITION is not allowed on a temporary view
47+
DESC temp_v PARTITION (c='Us', d=1);
48+
49+
-- DESC Persistent View
50+
51+
DESC v;
52+
53+
DESC TABLE v;
54+
55+
DESC FORMATTED v;
56+
57+
DESC EXTENDED v;
58+
59+
-- AnalysisException DESC PARTITION is not allowed on a view
60+
DESC v PARTITION (c='Us', d=1);
61+
62+
-- DROP TEST TABLES/VIEWS
3163
DROP TABLE t;
64+
65+
DROP VIEW temp_v;
66+
67+
DROP VIEW v;

0 commit comments

Comments
 (0)