blob: 167278eaa23c0547c6363af77efff0004c656264 [file] [log] [blame]
====
---- QUERY
# Test that in-mem sorts incrementally give up memory when emitting output.
# This query and scratch limit are chosen so that the query fails if the first sort
# does not give up memory to the second sort. Scans the text formatted file so that
# the scan uses less reservation.
# num_nodes = 1 is set for this file by the python test.
set scratch_limit=0;
set buffer_pool_limit=35m;
set default_spillable_buffer_size=64kb;
SELECT *
FROM (SELECT
Rank() OVER(ORDER BY l_orderkey) AS rank,
Rank() OVER(ORDER BY l_partkey) AS rank2
FROM tpch.lineitem
WHERE l_shipdate < '1992-05-09') a
WHERE rank < 10
ORDER BY rank;
---- RESULTS
1,118035
2,55836
2,141809
2,155407
5,84064
5,129763
7,10725
7,31340
7,155173
---- TYPES
BIGINT,BIGINT
====