Skip to content

Commit

Permalink
[Enhancement] enable adaptive partition hash join by default
Browse files Browse the repository at this point in the history
Signed-off-by: stdpain <[email protected]>
  • Loading branch information
stdpain committed Sep 20, 2024
1 parent 45d72ac commit 9bef55c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -249,13 +249,18 @@ StatusOr<std::function<StatusOr<ChunkPtr>()>> SpillableHashJoinBuildOperator::_c

return [this]() -> StatusOr<ChunkPtr> {
if (_hash_table_build_chunk_slice.empty()) {
if (_hash_table_iterate_idx + 1 >= _hash_tables.size()) {
_hash_table_iterate_idx++;
for (; _hash_table_iterate_idx < _hash_tables.size(); _hash_table_iterate_idx++) {
auto build_chunk = _hash_tables[_hash_table_iterate_idx]->get_build_chunk();
if (build_chunk->num_rows() > 0) {
_hash_table_build_chunk_slice.reset(build_chunk);
_hash_table_build_chunk_slice.skip(kHashJoinKeyColumnOffset);
break;
}
}
if (_hash_table_build_chunk_slice.empty()) {
_join_builder->hash_join_builder()->reset(_join_builder->hash_table_param());
return Status::EndOfFile("eos");
} else {
_hash_table_iterate_idx++;
_hash_table_build_chunk_slice.reset(_hash_tables[_hash_table_iterate_idx]->get_build_chunk());
_hash_table_build_chunk_slice.skip(kHashJoinKeyColumnOffset);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1263,7 +1263,7 @@ public static MaterializedViewRewriteMode parse(String str) {
private boolean joinLateMaterialization = false;

@VariableMgr.VarAttr(name = ENABLE_PARTITION_HASH_JOIN)
private boolean enablePartitionHashJoin = false;
private boolean enablePartitionHashJoin = true;

@VariableMgr.VarAttr(name = ENABLE_PRUNE_COLUMN_AFTER_INDEX_FILTER, flag = VariableMgr.INVISIBLE)
private boolean enablePruneColumnAfterIndexFilter = true;
Expand Down

0 comments on commit 9bef55c

Please sign in to comment.