Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save toddlipcon/5018d6ff50f846c72762319eb7cf5ca8 to your computer and use it in GitHub Desktop.
Save toddlipcon/5018d6ff50f846c72762319eb7cf5ca8 to your computer and use it in GitHub Desktop.
[nightly6x-2.gce.cloudera.com:21000] default> create table mixedtable (x tinyint) partitioned by (y int) stored as parquetfile;
Query: create table mixedtable (x tinyint) partitioned by (y int) stored as parquetfile
+-------------------------+
| summary |
+-------------------------+
| Table has been created. |
+-------------------------+
Fetched 1 row(s) in 0.43s
[nightly6x-2.gce.cloudera.com:21000] default> describe mixedtable;
Query: describe mixedtable
+------+---------+---------+
| name | type | comment |
+------+---------+---------+
| x | tinyint | |
| y | int | |
+------+---------+---------+
Fetched 2 row(s) in 3.99s
[nightly6x-2.gce.cloudera.com:21000] default> alter table mixedtable add partition (y=1);
Query: alter table mixedtable add partition (y=1)
+--------------------------------------------+
| summary |
+--------------------------------------------+
| New partition has been added to the table. |
+--------------------------------------------+
Fetched 1 row(s) in 0.07s
[nightly6x-2.gce.cloudera.com:21000] default> alter table mixedtable partition (y=1) set fileformat avro;
Query: alter table mixedtable partition (y=1) set fileformat avro
+-------------------------+
| summary |
+-------------------------+
| Updated 1 partition(s). |
+-------------------------+
Fetched 1 row(s) in 0.19s
[nightly6x-2.gce.cloudera.com:21000] default> describe mixedtable;
Query: describe mixedtable
+------+---------+---------+
| name | type | comment |
+------+---------+---------+
| x | tinyint | |
| y | int | |
+------+---------+---------+
Fetched 2 row(s) in 0.00s
[nightly6x-2.gce.cloudera.com:21000] default> refresh mixedtable;
Query: refresh mixedtable
Query submitted at: 2018-07-11 21:27:41 (Coordinator: https://nightly6x-2.gce.cloudera.com:25000)
Query progress can be monitored at: https://nightly6x-2.gce.cloudera.com:25000/query_plan?query_id=9047a3cacf2305e5:ffbf61ee00000000
Fetched 0 row(s) in 0.10s
[nightly6x-2.gce.cloudera.com:21000] default> describe mixedtable;
Query: describe mixedtable
+------+------+-------------------+
| name | type | comment |
+------+------+-------------------+
| x | int | from deserializer |
| y | int | |
+------+------+-------------------+
Fetched 2 row(s) in 0.00s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment