1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
CREATE TABLE t (a STRING, b INT, c STRING, d STRING) USING parquet PARTITIONED BY (c, d);
ALTER TABLE t ADD PARTITION (c='Us', d=1);
DESCRIBE t;
DESC t;
DESC TABLE t;
-- Ignore these because there exist timestamp results, e.g., `Create Table`.
-- DESC EXTENDED t;
-- DESC FORMATTED t;
DESC t PARTITION (c='Us', d=1);
-- Ignore these because there exist timestamp results, e.g., transient_lastDdlTime.
-- DESC EXTENDED t PARTITION (c='Us', d=1);
-- DESC FORMATTED t PARTITION (c='Us', d=1);
-- NoSuchPartitionException: Partition not found in table
DESC t PARTITION (c='Us', d=2);
-- AnalysisException: Partition spec is invalid
DESC t PARTITION (c='Us');
-- ParseException: PARTITION specification is incomplete
DESC t PARTITION (c='Us', d);
-- DROP TEST TABLE
DROP TABLE t;
|