wutiangan commented on a change in pull request #3034: implements intersect node
URL: https://github.com/apache/incubator-doris/pull/3034#discussion_r388753178
 
 

 ##########
 File path: be/src/exec/intersect_node.cpp
 ##########
 @@ -56,4 +41,164 @@ Status IntersectNode::init(const TPlanNode& tnode, 
RuntimeState* state) {
     }
     return Status::OK();
 }
-}
\ No newline at end of file
+
+Status IntersectNode::prepare(RuntimeState* state) {
+    RETURN_IF_ERROR(ExecNode::prepare(state));
+    _build_pool.reset(new MemPool(mem_tracker()));
+    SCOPED_TIMER(_runtime_profile->total_time_counter());
+    for (size_t i = 0; i < _child_expr_lists.size(); ++i) {
+        RETURN_IF_ERROR(Expr::prepare(_child_expr_lists[i], state, 
child(i)->row_desc(),
+                                      expr_mem_tracker()));
+    }
+    _build_tuple_size = child(0)->row_desc().tuple_descriptors().size();
+    _build_tuple_row_size = _build_tuple_size * sizeof(Tuple*);
+    _build_tuple_idx.reserve(_build_tuple_size);
+
+    for (int i = 0; i < _build_tuple_size; ++i) {
+        TupleDescriptor* build_tuple_desc = 
child(1)->row_desc().tuple_descriptors()[i];
 
 Review comment:
   child(1)?
    

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to