mirror of
https://github.com/apache/impala.git
synced 2026-01-08 03:02:48 -05:00
Add partition pruning tests
The following changes are included in this commit: 1. Modified the alltypesagg table to include an additional partition key that has nulls. 2. Added a number of tests in hdfs.test that exercise the partition pruning logic (see IMPALA-887). 3. Modified all the tests that are affected by the change in alltypesagg. Change-Id: I1a769375aaa71273341522eb94490ba5e4c6f00d Reviewed-on: http://gerrit.ent.cloudera.com:8080/2874 Reviewed-by: Dimitris Tsirogiannis <dtsirogiannis@cloudera.com> Tested-by: jenkins Reviewed-on: http://gerrit.ent.cloudera.com:8080/3236
This commit is contained in:
committed by
jenkins
parent
13f487ae31
commit
5a6f53db16
@@ -462,6 +462,8 @@ INSERT OVERWRITE TABLE {db_name}{db_suffix}.{table_name} partition (year, month,
|
||||
SELECT id, bool_col, tinyint_col, smallint_col, int_col, bigint_col, float_col, double_col, date_string_col, string_col, timestamp_col, year, month, day
|
||||
FROM {db_name}.{table_name};
|
||||
---- LOAD
|
||||
SET hive.exec.dynamic.partition.mode=nonstrict;
|
||||
SET hive.exec.dynamic.partition=true;
|
||||
LOAD DATA LOCAL INPATH '{impala_home}/testdata/target/AllTypesAgg/100101.txt' OVERWRITE INTO TABLE {db_name}{db_suffix}.{table_name} PARTITION(year=2010, month=1, day=1);
|
||||
LOAD DATA LOCAL INPATH '{impala_home}/testdata/target/AllTypesAgg/100102.txt' OVERWRITE INTO TABLE {db_name}{db_suffix}.{table_name} PARTITION(year=2010, month=1, day=2);
|
||||
LOAD DATA LOCAL INPATH '{impala_home}/testdata/target/AllTypesAgg/100103.txt' OVERWRITE INTO TABLE {db_name}{db_suffix}.{table_name} PARTITION(year=2010, month=1, day=3);
|
||||
@@ -472,6 +474,7 @@ LOAD DATA LOCAL INPATH '{impala_home}/testdata/target/AllTypesAgg/100107.txt' OV
|
||||
LOAD DATA LOCAL INPATH '{impala_home}/testdata/target/AllTypesAgg/100108.txt' OVERWRITE INTO TABLE {db_name}{db_suffix}.{table_name} PARTITION(year=2010, month=1, day=8);
|
||||
LOAD DATA LOCAL INPATH '{impala_home}/testdata/target/AllTypesAgg/100109.txt' OVERWRITE INTO TABLE {db_name}{db_suffix}.{table_name} PARTITION(year=2010, month=1, day=9);
|
||||
LOAD DATA LOCAL INPATH '{impala_home}/testdata/target/AllTypesAgg/100110.txt' OVERWRITE INTO TABLE {db_name}{db_suffix}.{table_name} PARTITION(year=2010, month=1, day=10);
|
||||
INSERT INTO TABLE {db_name}{db_suffix}.{table_name} partition (year, month, day) SELECT id, bool_col, tinyint_col, smallint_col, int_col, bigint_col, float_col, double_col, date_string_col, string_col, timestamp_col, year, month, tinyint_col as day FROM {db_name}.{table_name} WHERE year=2010 and month=1 and tinyint_col IS NULL order by id;
|
||||
====
|
||||
---- DATASET
|
||||
functional
|
||||
@@ -1077,13 +1080,13 @@ ALTER TABLE {table_name} ADD IF NOT EXISTS PARTITION(id=8);
|
||||
ALTER TABLE {table_name} ADD IF NOT EXISTS PARTITION(id=9);
|
||||
---- DEPENDENT_LOAD
|
||||
INSERT OVERWRITE TABLE {db_name}{db_suffix}.{table_name} partition (id)
|
||||
select bool_col,id FROM {db_name}.alltypesagg where id < 10;
|
||||
select distinct bool_col,id FROM {db_name}.alltypesagg where id < 10 order by id;
|
||||
---- LOAD
|
||||
SET hive.exec.dynamic.partition.mode=nonstrict;
|
||||
SET hive.exec.dynamic.partition=true;
|
||||
SET hive.input.format=org.apache.hadoop.hive.ql.io.HiveInputFormat;
|
||||
INSERT OVERWRITE TABLE {db_name}{db_suffix}.{table_name} partition (id)
|
||||
select bool_col,id FROM {db_name}.alltypesagg where id < 10;
|
||||
select distinct bool_col,id FROM {db_name}.alltypesagg where id < 10 order by id;
|
||||
====
|
||||
---- DATASET
|
||||
functional
|
||||
|
||||
Reference in New Issue
Block a user