mirror of
https://github.com/apache/impala.git
synced 2025-12-30 12:02:10 -05:00
- Added static order by tests to test_queries.py and QueryTest/sort.test - test_order_by.py also contains tests with static queries that are run with multiple memory limits. - Added stress, scratch disk and failpoints tests - Incorporated Srinath's change that copied all order by with limit tests into the top-n.test file Extra time required: Serial: scratch disk: 42 seconds test queries sort : 77 seconds test sort: 56 seconds sort stress: 142 seconds TOTAL: 5 min 17 seconds Parallel(8 threads): scratch disk: 40 seconds test queries sort: 42 seconds test sort: 49 seconds sort stress: 93 seconds TOTAL: 3 min 44 sec Change-Id: Ic5716bcfabb5bb3053c6b9cebc9bfbbb9dc64a7c Reviewed-on: http://gerrit.ent.cloudera.com:8080/2820 Reviewed-by: Taras Bobrovytsky <tbobrovytsky@cloudera.com> Tested-by: jenkins Reviewed-on: http://gerrit.ent.cloudera.com:8080/3205
72 lines
1.8 KiB
Plaintext
72 lines
1.8 KiB
Plaintext
====
|
|
---- QUERY
|
|
# Basic test on querying a view.
|
|
select count(int_col), count(bigint_col) from functional.alltypes_view
|
|
---- RESULTS
|
|
7300,7300
|
|
---- TYPES
|
|
BIGINT, BIGINT
|
|
====
|
|
---- QUERY
|
|
# Using views in union.
|
|
select bigint_col, string_col from functional.alltypes_view order by id limit 2
|
|
union all (select * from functional.complex_view) order by 1, 2 limit 10
|
|
---- RESULTS
|
|
0,'0'
|
|
2,'0'
|
|
2,'1'
|
|
10,'1'
|
|
---- TYPES
|
|
BIGINT, STRING
|
|
====
|
|
---- QUERY
|
|
# Using a view in subquery.
|
|
select t.* from (select * from functional.complex_view) t
|
|
order by t.abc, t.xyz desc limit 10;
|
|
---- RESULTS
|
|
2,'1'
|
|
2,'0'
|
|
---- TYPES
|
|
BIGINT, STRING
|
|
====
|
|
---- QUERY
|
|
# Using multiple views in a join.
|
|
select count(*) from functional.alltypes_view t1, functional.alltypes_view_sub t2
|
|
where t1.id < 10 and t2.x < 5 and t1.id = t2.x
|
|
---- RESULTS
|
|
3650
|
|
---- TYPES
|
|
BIGINT
|
|
====
|
|
---- QUERY
|
|
# Self-join of a view to make sure the join op is properly set
|
|
# in the cloned view instances.
|
|
select count(*) from functional.alltypes_view t1
|
|
left outer join functional.alltypes_view t2 on t1.id+10 = t2.id
|
|
full outer join functional.alltypes_view t3 on t2.id+20 = t3.id
|
|
---- RESULTS
|
|
7330
|
|
---- TYPES
|
|
BIGINT
|
|
====
|
|
---- QUERY
|
|
# Test that Impala can handle incorrect column metadata created by Hive (IMPALA-994).
|
|
select * from functional.alltypes_hive_view where id = 0
|
|
---- RESULTS
|
|
0,true,0,0,0,0,0,0,'01/01/09','0',2009-01-01 00:00:00,2009,1
|
|
---- TYPES
|
|
INT, BOOLEAN, TINYINT, SMALLINT, INT, BIGINT, FLOAT, DOUBLE, STRING, STRING, TIMESTAMP, INT, INT
|
|
====
|
|
---- QUERY
|
|
# Regression test for IMPALA-1010. This currently produces a bushy plan.
|
|
select STRAIGHT_JOIN c.id, d.date_string_col from
|
|
alltypessmall d join [SHUFFLE] (select a.id as id, b.date_string_col from
|
|
alltypessmall a join [SHUFFLE] alltypessmall b on (a.id = b.id)) c on c.id = d.id
|
|
order by c.id limit 2
|
|
---- RESULTS
|
|
0,'01/01/09'
|
|
1,'01/01/09'
|
|
---- TYPES
|
|
int, STRING
|
|
====
|