PREHOOK: query: -- Tests truncating columns from a bucketed table, table should remain bucketed CREATE TABLE test_tab (key STRING, value STRING) CLUSTERED BY (key) INTO 2 BUCKETS STORED AS RCFILE PREHOOK: type: CREATETABLE POSTHOOK: query: -- Tests truncating columns from a bucketed table, table should remain bucketed CREATE TABLE test_tab (key STRING, value STRING) CLUSTERED BY (key) INTO 2 BUCKETS STORED AS RCFILE POSTHOOK: type: CREATETABLE POSTHOOK: Output: default@test_tab PREHOOK: query: INSERT OVERWRITE TABLE test_tab SELECT * FROM src PREHOOK: type: QUERY PREHOOK: Input: default@src PREHOOK: Output: default@test_tab POSTHOOK: query: INSERT OVERWRITE TABLE test_tab SELECT * FROM src POSTHOOK: type: QUERY POSTHOOK: Input: default@src POSTHOOK: Output: default@test_tab POSTHOOK: Lineage: test_tab.key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ] POSTHOOK: Lineage: test_tab.value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] PREHOOK: query: -- Check how many rows there are in each bucket, there should be two rows SELECT cnt FROM ( SELECT INPUT__FILE__NAME file_name, count(*) cnt FROM test_tab GROUP BY INPUT__FILE__NAME ORDER BY file_name DESC)a PREHOOK: type: QUERY PREHOOK: Input: default@test_tab #### A masked pattern was here #### POSTHOOK: query: -- Check how many rows there are in each bucket, there should be two rows SELECT cnt FROM ( SELECT INPUT__FILE__NAME file_name, count(*) cnt FROM test_tab GROUP BY INPUT__FILE__NAME ORDER BY file_name DESC)a POSTHOOK: type: QUERY POSTHOOK: Input: default@test_tab #### A masked pattern was here #### POSTHOOK: Lineage: test_tab.key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ] POSTHOOK: Lineage: test_tab.value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] 258 242 PREHOOK: query: -- Truncate a column on which the table is not bucketed TRUNCATE TABLE test_tab COLUMNS (value) PREHOOK: type: TRUNCATETABLE PREHOOK: Input: default@test_tab PREHOOK: Output: default@test_tab POSTHOOK: query: -- Truncate a column on which the table is not bucketed TRUNCATE TABLE test_tab COLUMNS (value) POSTHOOK: type: TRUNCATETABLE POSTHOOK: Input: default@test_tab POSTHOOK: Output: default@test_tab POSTHOOK: Lineage: test_tab.key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ] POSTHOOK: Lineage: test_tab.value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] PREHOOK: query: -- Check how many rows there are in each bucket, this should produce the same rows as before -- because truncate should not break bucketing SELECT cnt FROM ( SELECT INPUT__FILE__NAME file_name, count(*) cnt FROM test_tab GROUP BY INPUT__FILE__NAME ORDER BY file_name DESC)a PREHOOK: type: QUERY PREHOOK: Input: default@test_tab #### A masked pattern was here #### POSTHOOK: query: -- Check how many rows there are in each bucket, this should produce the same rows as before -- because truncate should not break bucketing SELECT cnt FROM ( SELECT INPUT__FILE__NAME file_name, count(*) cnt FROM test_tab GROUP BY INPUT__FILE__NAME ORDER BY file_name DESC)a POSTHOOK: type: QUERY POSTHOOK: Input: default@test_tab #### A masked pattern was here #### POSTHOOK: Lineage: test_tab.key SIMPLE [(src)src.FieldSchema(name:key, type:string, comment:default), ] POSTHOOK: Lineage: test_tab.value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] 258 242