Skip to content

Commit

Permalink
Fix: remove mem tracker for hash join operator in pipeline (StarRocks…
Browse files Browse the repository at this point in the history
  • Loading branch information
ZiheLiu authored Oct 29, 2021
1 parent c5204ba commit 439b9fd
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions be/src/exec/pipeline/hashjoin/hash_join_build_operator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ void HashJoinBuildOperator::finish(RuntimeState* state) {
HashJoinBuildOperatorFactory::HashJoinBuildOperatorFactory(int32_t id, int32_t plan_node_id, HashJoiner* hash_joiner)
: OperatorFactory(id, "hash_join_build", plan_node_id), _hash_joiner(hash_joiner) {}

Status HashJoinBuildOperatorFactory::prepare(RuntimeState* state, MemTracker* mem_tracker) {
RETURN_IF_ERROR(OperatorFactory::prepare(state, mem_tracker));
Status HashJoinBuildOperatorFactory::prepare(RuntimeState* state) {
RETURN_IF_ERROR(OperatorFactory::prepare(state));
return _hash_joiner->prepare(state);
}

Expand Down
2 changes: 1 addition & 1 deletion be/src/exec/pipeline/hashjoin/hash_join_build_operator.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class HashJoinBuildOperatorFactory final : public OperatorFactory {
public:
HashJoinBuildOperatorFactory(int32_t id, int32_t plan_node_id, HashJoiner* hash_joiner);
~HashJoinBuildOperatorFactory() = default;
Status prepare(RuntimeState* state, MemTracker* mem_tracker) override;
Status prepare(RuntimeState* state) override;
void close(RuntimeState* state) override;
OperatorPtr create(int32_t degree_of_parallelism, int32_t driver_sequence) override;

Expand Down
4 changes: 2 additions & 2 deletions be/src/exec/pipeline/hashjoin/hash_join_probe_operator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ HashJoinProbeOperatorFactory::HashJoinProbeOperatorFactory(int32_t id, int32_t p
std::unique_ptr<HashJoiner>&& hash_joiner)
: OperatorFactory(id, "hash_join_probe", plan_node_id), _hash_joiner(std::move(hash_joiner)) {}

Status HashJoinProbeOperatorFactory::prepare(RuntimeState* state, MemTracker* mem_tracker) {
return OperatorFactory::prepare(state, mem_tracker);
Status HashJoinProbeOperatorFactory::prepare(RuntimeState* state) {
return OperatorFactory::prepare(state);
}
void HashJoinProbeOperatorFactory::close(RuntimeState* state) {
OperatorFactory::close(state);
Expand Down
2 changes: 1 addition & 1 deletion be/src/exec/pipeline/hashjoin/hash_join_probe_operator.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class HashJoinProbeOperatorFactory final : public OperatorFactory {

~HashJoinProbeOperatorFactory() = default;

Status prepare(RuntimeState* state, MemTracker* mem_tracker) override;
Status prepare(RuntimeState* state) override;
void close(RuntimeState* state) override;

OperatorPtr create(int32_t degree_of_parallelism, int32_t driver_sequence) override;
Expand Down
8 changes: 4 additions & 4 deletions be/src/exec/vectorized/hash_joiner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,10 @@ Status HashJoiner::prepare(RuntimeState* state) {
_avg_output_chunk_size = ADD_COUNTER(_runtime_profile, "AvgOutputChunkSize", TUnit::UNIT);
_runtime_profile->add_info_string("JoinType", _get_join_type_str(_join_type));

RETURN_IF_ERROR(Expr::prepare(_build_expr_ctxs, state, _build_row_descriptor, _expr_mem_tracker.get()));
RETURN_IF_ERROR(Expr::prepare(_probe_expr_ctxs, state, _probe_row_descriptor, _expr_mem_tracker.get()));
RETURN_IF_ERROR(Expr::prepare(_other_join_conjunct_ctxs, state, _row_descriptor, _expr_mem_tracker.get()));
RETURN_IF_ERROR(Expr::prepare(_conjunct_ctxs, state, _row_descriptor, _expr_mem_tracker.get()));
RETURN_IF_ERROR(Expr::prepare(_build_expr_ctxs, state, _build_row_descriptor));
RETURN_IF_ERROR(Expr::prepare(_probe_expr_ctxs, state, _probe_row_descriptor));
RETURN_IF_ERROR(Expr::prepare(_other_join_conjunct_ctxs, state, _row_descriptor));
RETURN_IF_ERROR(Expr::prepare(_conjunct_ctxs, state, _row_descriptor));
RETURN_IF_ERROR(Expr::open(_build_expr_ctxs, state));
RETURN_IF_ERROR(Expr::open(_probe_expr_ctxs, state));
RETURN_IF_ERROR(Expr::open(_other_join_conjunct_ctxs, state));
Expand Down

0 comments on commit 439b9fd

Please sign in to comment.