Skip to content

Commit

Permalink
address comments
Browse files Browse the repository at this point in the history
Signed-off-by: xufei <[email protected]>
  • Loading branch information
windtalker committed Jun 21, 2022
1 parent ec38331 commit 8211048
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion dbms/src/Flash/Coprocessor/DAGContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ ExchangeReceiverPtr DAGContext::getMPPExchangeReceiver(const String & executor_i
return mpp_receiver_set->getExchangeReceiver(executor_id);
}

void DAGContext::addCoprocessorReader(CoprocessorReaderPtr coprocessor_reader)
void DAGContext::addCoprocessorReader(const CoprocessorReaderPtr & coprocessor_reader)
{
if (!isMPPTask())
return;
Expand Down
4 changes: 2 additions & 2 deletions dbms/src/Flash/Coprocessor/DAGContext.h
Original file line number Diff line number Diff line change
Expand Up @@ -310,11 +310,11 @@ class DAGContext
bool columnsForTestEmpty() { return columns_for_test_map.empty(); }

ExchangeReceiverPtr getMPPExchangeReceiver(const String & executor_id) const;
void setMPPReceiverSet(MPPReceiverSetPtr receiver_set)
void setMPPReceiverSet(const MPPReceiverSetPtr & receiver_set)
{
mpp_receiver_set = receiver_set;
}
void addCoprocessorReader(CoprocessorReaderPtr coprocessor_reader);
void addCoprocessorReader(const CoprocessorReaderPtr & coprocessor_reader);

void addSubquery(const String & subquery_id, SubqueryForSet && subquery);
bool hasSubquery() const { return !subqueries.empty(); }
Expand Down
6 changes: 3 additions & 3 deletions dbms/src/Flash/Mpp/MPPReceiverSet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@

namespace DB
{
void MPPReceiverSet::addExchangeReceiver(const String & executor_id, ExchangeReceiverPtr exchange_receiver)
void MPPReceiverSet::addExchangeReceiver(const String & executor_id, const ExchangeReceiverPtr & exchange_receiver)
{
RUNTIME_ASSERT(exchange_receiver_map.find(executor_id) == exchange_receiver_map.end(), log, "Duplicate executor_id in DAGRequest");
RUNTIME_ASSERT(exchange_receiver_map.find(executor_id) == exchange_receiver_map.end(), log, "Duplicate executor_id: {} in DAGRequest", executor_id);
exchange_receiver_map[executor_id] = exchange_receiver;
}

void MPPReceiverSet::addCoprocessorReader(CoprocessorReaderPtr coprocessor_reader)
void MPPReceiverSet::addCoprocessorReader(const CoprocessorReaderPtr & coprocessor_reader)
{
coprocessor_readers.push_back(coprocessor_reader);
}
Expand Down
4 changes: 2 additions & 2 deletions dbms/src/Flash/Mpp/MPPReceiverSet.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ class MPPReceiverSet
explicit MPPReceiverSet(const String & req_id)
: log(Logger::get("MPPReceiverSet", req_id))
{}
void addExchangeReceiver(const String & executor_id, ExchangeReceiverPtr exchange_receiver);
void addCoprocessorReader(CoprocessorReaderPtr coprocessor_reader);
void addExchangeReceiver(const String & executor_id, const ExchangeReceiverPtr & exchange_receiver);
void addCoprocessorReader(const CoprocessorReaderPtr & coprocessor_reader);
ExchangeReceiverPtr getExchangeReceiver(const String & executor_id) const;
void cancel();

Expand Down

0 comments on commit 8211048

Please sign in to comment.