Skip to content

Commit

Permalink
fixup1
Browse files Browse the repository at this point in the history
Signed-off-by: satanson <[email protected]>
  • Loading branch information
satanson committed Sep 13, 2023
1 parent b9ee452 commit 4a4a938
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion be/src/exec/hash_join_components.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ void HashJoinBuilder::reset(const HashTableParam& param) {

void HashJoinBuilder::reset_probe(RuntimeState* state) {
_key_columns.clear();
(void)_ht.reset_probe_state(state);
_ht.reset_probe_state(state);
}

Status HashJoinBuilder::append_chunk(RuntimeState* state, const ChunkPtr& chunk) {
Expand Down
2 changes: 1 addition & 1 deletion be/src/exec/hash_join_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -558,7 +558,7 @@ bool HashJoinNode::_has_null(const ColumnPtr& column) {
Status HashJoinNode::_build(RuntimeState* state) {
// build hash table
SCOPED_TIMER(_build_ht_timer);
TRY_CATCH_BAD_ALLOC(_ht.build(state));
TRY_CATCH_BAD_ALLOC(RETURN_IF_ERROR(_ht.build(state)));
return Status::OK();
}

Expand Down
3 changes: 1 addition & 2 deletions be/src/exec/join_hash_map.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,7 @@ Status JoinHashTable::build(RuntimeState* state) {
return Status::OK();
}

Status JoinHashTable::reset_probe_state(starrocks::RuntimeState* state) {
void JoinHashTable::reset_probe_state(starrocks::RuntimeState* state) {
_hash_map_type = _choose_join_hash_map();
switch (_hash_map_type) {
#define M(NAME) \
Expand All @@ -471,7 +471,6 @@ Status JoinHashTable::reset_probe_state(starrocks::RuntimeState* state) {
default:
assert(false);
}
return Status::OK();
}

Status JoinHashTable::probe(RuntimeState* state, const Columns& key_columns, ChunkPtr* probe_chunk, ChunkPtr* chunk,
Expand Down
2 changes: 1 addition & 1 deletion be/src/exec/join_hash_map.h
Original file line number Diff line number Diff line change
Expand Up @@ -760,7 +760,7 @@ class JoinHashTable {
void close();

[[nodiscard]] Status build(RuntimeState* state);
[[nodiscard]] Status reset_probe_state(RuntimeState* state);
void reset_probe_state(RuntimeState* state);
[[nodiscard]] Status probe(RuntimeState* state, const Columns& key_columns, ChunkPtr* probe_chunk, ChunkPtr* chunk,
bool* eos);
[[nodiscard]] Status probe_remain(RuntimeState* state, ChunkPtr* chunk, bool* eos);
Expand Down
2 changes: 1 addition & 1 deletion be/src/exec/pipeline/hashjoin/hash_join_probe_operator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ Status HashJoinProbeOperator::reset_state(RuntimeState* state, const vector<Chun
_reference_builder_hash_table_once();
// Reset probe state only when it has valid state after referencing the build hash table.
if (_join_prober->has_referenced_hash_table()) {
_join_prober->reset_probe(state);
RETURN_IF_ERROR(_join_prober->reset_probe(state));
}
return Status::OK();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ Status SpillableHashJoinProbeOperator::_push_probe_chunk(RuntimeState* state, co
// TODO: add chunk accumulator here
auto partitioned_chunk = chunk->clone_empty();
partitioned_chunk->append_selective(*chunk, selection.data(), from, size);
_probers[iter->second]->push_probe_chunk(state, std::move(partitioned_chunk));
(void)_probers[iter->second]->push_probe_chunk(state, std::move(partitioned_chunk));
}
probe_partition->num_rows += size;
};
Expand Down Expand Up @@ -335,7 +335,7 @@ Status SpillableHashJoinProbeOperator::_restore_probe_partition(RuntimeState* st
auto chunk_st = _current_reader[i]->restore(
state, *_executor, RESOURCE_TLS_MEMTRACER_GUARD(state, std::weak_ptr(_current_reader[i])));
if (chunk_st.ok() && chunk_st.value() && !chunk_st.value()->is_empty()) {
_probers[i]->push_probe_chunk(state, std::move(chunk_st.value()));
RETURN_IF_ERROR(_probers[i]->push_probe_chunk(state, std::move(chunk_st.value())));
} else if (chunk_st.status().is_end_of_file()) {
_probe_read_eofs[i] = true;
} else if (!chunk_st.ok()) {
Expand Down Expand Up @@ -514,4 +514,4 @@ OperatorPtr SpillableHashJoinProbeOperatorFactory::create(int32_t degree_of_para
return prober;
}

} // namespace starrocks::pipeline
} // namespace starrocks::pipeline

0 comments on commit 4a4a938

Please sign in to comment.