yangzhg commented on a change in pull request #3228: Fix output results may  
incorrect  when using intersect and except statements
URL: https://github.com/apache/incubator-doris/pull/3228#discussion_r400632518
 
 

 ##########
 File path: be/src/exec/except_node.cpp
 ##########
 @@ -179,17 +137,21 @@ Status ExceptNode::get_next(RuntimeState* state, 
RowBatch* out_batch, bool* eos)
     if (reached_limit()) {
         return Status::OK();
     }
+    int64_t tuple_buf_size;
+    uint8_t* tuple_buf;
+    RETURN_IF_ERROR(
+            out_batch->resize_and_allocate_tuple_buffer(state, 
&tuple_buf_size, &tuple_buf));
     uint32_t previous_hash = -1;
     TupleRow* previous_row = nullptr;
     while (_hash_tbl_iterator.has_next()) {
+        VLOG_ROW << "find row: "
+                 << get_row_output_string(_hash_tbl_iterator.get_row(), 
child(0)->row_desc())
+                 << " matched: " << _hash_tbl_iterator.matched();
         if (!_hash_tbl_iterator.matched()) {
             if (previous_hash != _hash_tbl_iterator.get_hash() ||
                 !equals(previous_row, _hash_tbl_iterator.get_row())) {
 
 Review comment:
   duplicated values will be iterate when get next,and deduplicate can reduce 
the cost of probe,you can find detail in hash_table.h,hash table in doris is 
not same with the common sense hashtable 

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to