mirror of
https://github.com/apache/impala.git
synced 2026-01-06 06:01:03 -05:00
This change fixed IMPALA-4873 by adding the capability to supply a dict 'test_file_vars' to run_test_case(). Keys in this dict will be replaced with their values inside test queries before they are executed. Change-Id: Ie3f3c29a42501cfb2751f7ad0af166eb88f63b70 Reviewed-on: http://gerrit.cloudera.org:8080/6817 Reviewed-by: Michael Brown <mikeb@cloudera.com> Tested-by: Impala Public Jenkins
137 lines
2.7 KiB
Plaintext
137 lines
2.7 KiB
Plaintext
====
|
|
---- QUERY
|
|
set max_scan_range_length=0;
|
|
select c1, c2 from table_with_header
|
|
---- RESULTS
|
|
1,2
|
|
3,4
|
|
5,6
|
|
---- TYPES
|
|
INT,DOUBLE
|
|
====
|
|
---- QUERY
|
|
set max_scan_range_length=0;
|
|
select count(*) from table_with_header
|
|
---- RESULTS
|
|
3
|
|
---- TYPES
|
|
BIGINT
|
|
====
|
|
---- QUERY
|
|
set max_scan_range_length=2;
|
|
select c1, c2 from table_with_header
|
|
---- RESULTS
|
|
1,2
|
|
3,4
|
|
5,6
|
|
---- TYPES
|
|
INT,DOUBLE
|
|
====
|
|
---- QUERY
|
|
set max_scan_range_length=2;
|
|
select count(*) from table_with_header
|
|
---- RESULTS
|
|
3
|
|
---- TYPES
|
|
BIGINT
|
|
====
|
|
---- QUERY
|
|
set max_scan_range_length=30;
|
|
select c1, c2 from table_with_header
|
|
---- RESULTS
|
|
1,2
|
|
3,4
|
|
5,6
|
|
---- TYPES
|
|
INT,DOUBLE
|
|
====
|
|
---- QUERY
|
|
set max_scan_range_length=30;
|
|
select count(*) from table_with_header
|
|
---- RESULTS
|
|
3
|
|
---- TYPES
|
|
BIGINT
|
|
====
|
|
---- QUERY
|
|
set max_scan_range_length=0;
|
|
select c1, c2 from table_with_header_2
|
|
---- RESULTS
|
|
1,2
|
|
3,4
|
|
5,6
|
|
---- TYPES
|
|
INT,DOUBLE
|
|
====
|
|
---- QUERY
|
|
set max_scan_range_length=0;
|
|
select count(*) from table_with_header_2
|
|
---- RESULTS
|
|
3
|
|
---- TYPES
|
|
BIGINT
|
|
====
|
|
---- QUERY
|
|
# This test is only supported on uncompressed tables, since we always only issue one
|
|
# single scan range for a compressed file.
|
|
set max_scan_range_length=2;
|
|
set abort_on_error=1;
|
|
select c1, c2 from functional.table_with_header_2
|
|
---- CATCH
|
|
increasing max_scan_range_length to a value larger than the size of the file's header.
|
|
---- TYPES
|
|
INT,DOUBLE
|
|
====
|
|
---- QUERY
|
|
# This test is only supported on uncompressed tables, since we always only issue one
|
|
# single scan range for a compressed file.
|
|
set max_scan_range_length=2;
|
|
set abort_on_error=0;
|
|
select c1, c2 from functional.table_with_header_2
|
|
---- CATCH
|
|
increasing max_scan_range_length to a value larger than the size of the file's header.
|
|
---- TYPES
|
|
INT,DOUBLE
|
|
====
|
|
---- QUERY
|
|
set max_scan_range_length=30;
|
|
select c1, c2 from table_with_header_2
|
|
---- RESULTS
|
|
1,2
|
|
3,4
|
|
5,6
|
|
---- TYPES
|
|
INT,DOUBLE
|
|
====
|
|
---- QUERY
|
|
set max_scan_range_length=30;
|
|
select count(*) from table_with_header_2
|
|
---- RESULTS
|
|
3
|
|
---- TYPES
|
|
BIGINT
|
|
====
|
|
---- QUERY
|
|
drop table if exists $UNIQUE_DB.mixed;
|
|
create table $UNIQUE_DB.mixed (kf smallint) partitioned by (year smallint) stored as textfile;
|
|
alter table $UNIQUE_DB.mixed add partition (year=2012);
|
|
alter table $UNIQUE_DB.mixed add partition (year=2013);
|
|
alter table $UNIQUE_DB.mixed partition (year=2013) set fileformat parquet;
|
|
insert into $UNIQUE_DB.mixed partition (year=2012) values (1),(2),(3);
|
|
insert into $UNIQUE_DB.mixed partition (year=2013) values (4),(5),(6);
|
|
alter table $UNIQUE_DB.mixed set tblproperties("skip.header.line.count"="1");
|
|
alter table $UNIQUE_DB.mixed set fileformat parquet;
|
|
alter table $UNIQUE_DB.mixed set tblproperties("skip.header.line.count"="2");
|
|
select * from $UNIQUE_DB.mixed;
|
|
---- RESULTS
|
|
3,2012
|
|
4,2013
|
|
5,2013
|
|
6,2013
|
|
---- TYPES
|
|
SMALLINT,SMALLINT
|
|
====
|
|
---- QUERY
|
|
drop table $UNIQUE_DB.mixed;
|
|
====
|