Skip to content

Commit f3be490

Browse files
committed
add tpch test
1 parent 51509a4 commit f3be490

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

datafusion/physical-plan/src/aggregates/row_hash.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -699,6 +699,7 @@ impl Stream for GroupedHashAggregateStream {
699699
let timer = elapsed_compute.timer();
700700

701701
let batch = self.filter_by_selection_vector(batch)?;
702+
702703
// Make sure we have enough capacity for `batch`, otherwise spill
703704
self.spill_previous_if_necessary(&batch)?;
704705

datafusion/sqllogictest/test_files/tpch/tpch.slt

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,21 @@ include ./create_tables.slt.part
2121
include ./plans/q*.slt.part
2222
include ./answers/q*.slt.part
2323

24+
# test hash join with selection vector
25+
statement ok
26+
set datafusion.optimizer.prefer_hash_selection_vector_partitioning_agg = true;
27+
28+
statement ok
29+
set datafusion.optimizer.hash_join_single_partition_threshold = 0;
30+
31+
include ./answers/q*.slt.part
32+
33+
statement ok
34+
set datafusion.optimizer.prefer_hash_selection_vector_partitioning_agg = false;
35+
36+
statement ok
37+
set datafusion.optimizer.hash_join_single_partition_threshold = 1048576;
38+
2439
# test answers with sort merge join
2540
statement ok
2641
set datafusion.optimizer.prefer_hash_join = false;

0 commit comments

Comments
 (0)