In HashSemiJoinExecutor2, data chunk builder for each key was reserved with 1024 capacity. But they only have 4 rows on average in TPC-Q Q21. Therefore, more than 4*1020*2*1500000 = 12GB memory was wasted.
This PR fixes this bug by using DataChunkBuilder with dynamic capacity. This PR also replaces vectors by boxed slices in array, making sure that unused memory is released after build. Finally, it enables q21 in CI.
run-q21 time: [2.6544 s 2.6956 s 2.7059 s]
change: [-61.787% -61.416% -61.045%] (p = 0.05 < 0.05)
Signed-off-by: Runji Wang wangrunji0408@163.com
In
HashSemiJoinExecutor2
, data chunk builder for each key was reserved with 1024 capacity. But they only have 4 rows on average in TPC-Q Q21. Therefore, more than4*1020*2*1500000 = 12GB
memory was wasted.This PR fixes this bug by using
DataChunkBuilder
with dynamic capacity. This PR also replaces vectors by boxed slices in array, making sure that unused memory is released after build. Finally, it enables q21 in CI.