Files
impala/testdata/workloads/functional-query/queries/QueryTest/spilling.test
Nong Li 6b73eec02d PHJ: Fix block management when spilling.
The previous code did not handle well the case where the spilling happens when
building the hash table (i.e. partitioning the build rows fit). This caused the
probe partition to be starved causing queries that should be able to run to fail
with a not enough buffers error.

Change-Id: I3a9a84e8800a72ed3ce6f5ab7ff03bc2d6eb7ad8
Reviewed-on: http://gerrit.sjc.cloudera.com:8080/4403
Reviewed-by: Nong Li <nong@cloudera.com>
Tested-by: Nong Li <nong@cloudera.com>
2014-09-20 16:12:21 -07:00

87 lines
1.4 KiB
Plaintext

====
---- QUERY
set max_block_mgr_memory=45m;
select l_orderkey, count(*)
from lineitem
group by 1
order by 1 limit 10;
---- RESULTS
1,6
2,1
3,6
4,1
5,3
6,1
7,7
32,6
33,4
34,3
---- TYPES
BIGINT, BIGINT
====
---- QUERY
# Test query with string intermediate state.
set max_block_mgr_memory=50m;
select l_orderkey, avg(l_orderkey)
from lineitem
group by 1
order by 1 limit 5;
---- RESULTS
1,1
2,2
3,3
4,4
5,5
---- TYPES
BIGINT, DOUBLE
====
---- QUERY
# Test query with string grouping column
set max_block_mgr_memory=120m;
select l_comment, count(*)
from lineitem
group by 1
order by count(*) desc limit 5;
---- RESULTS
' furiously',943
' carefully',893
' carefully ',875
'carefully ',854
' furiously ',845
---- TYPES
STRING, BIGINT
====
---- QUERY
# Test query with string grouping column and string agg columns
set max_block_mgr_memory=70m;
select l_returnflag, l_orderkey, round(avg(l_tax),2), min(l_shipmode)
from lineitem
group by 1,2
order by 1,2 limit 3;
---- RESULTS
'A',3,0.05,'RAIL'
'A',5,0.03,'AIR'
'A',6,0.03,'TRUCK'
---- TYPES
STRING, BIGINT, DOUBLE, STRING
====
---- QUERY
set max_block_mgr_memory=100m;
select count(l1.l_tax)
from
lineitem l1,
lineitem l2,
lineitem l3
where
l1.l_tax < 0.01 and
l2.l_tax < 0.04 and
l1.l_orderkey = l2.l_orderkey and
l1.l_orderkey = l3.l_orderkey and
l1.l_comment = l3.l_comment and
l1.l_shipdate = l3.l_shipdate;
---- RESULTS
1846743
---- TYPES
BIGINT
====