Github user zuyu commented on a diff in the pull request:

    https://github.com/apache/incubator-quickstep/pull/300#discussion_r140569985
  
    --- Diff: query_optimizer/ExecutionGenerator.cpp ---
    @@ -939,6 +939,15 @@ void ExecutionGenerator::convertHashJoin(const 
P::HashJoinPtr &physical_plan) {
         
query_context_proto_->add_predicates()->CopyFrom(residual_predicate->getProto());
       }
     
    +  // Convert the build predicate proto.
    +  QueryContext::predicate_id build_predicate_index = 
QueryContext::kInvalidPredicateId;
    +  if (physical_plan->build_predicate()) {
    +    build_predicate_index = query_context_proto_->predicates_size();
    +
    +    unique_ptr<const Predicate> 
build_predicate(convertPredicate(physical_plan->build_predicate()));
    +    
query_context_proto_->add_predicates()->CopyFrom(build_predicate->getProto());
    --- End diff --
    
    Change to `MergeFrom` to avoid an unnecessary reset function call.


---

Reply via email to