BiteTheDDDDt commented on code in PR #28898:
URL: https://github.com/apache/doris/pull/28898#discussion_r1435037595


##########
be/src/vec/common/hash_table/hash_map.h:
##########
@@ -338,6 +341,26 @@ class JoinHashMapTable : public HashMapTable<Key, Cell, 
Hash, Grower, Allocator>
         auto matched_cnt = 0;
         const auto batch_size = max_batch_size;
 
+        if (_empty_table) {

Review Comment:
   add a function to process case when left anti+empty



##########
be/src/vec/common/hash_table/hash_map.h:
##########
@@ -338,6 +341,26 @@ class JoinHashMapTable : public HashMapTable<Key, Cell, 
Hash, Grower, Allocator>
         auto matched_cnt = 0;
         const auto batch_size = max_batch_size;
 
+        if (_empty_table) {
+            if constexpr (JoinOpType == doris::TJoinOp::LEFT_ANTI_JOIN ||
+                          JoinOpType == 
doris::TJoinOp::NULL_AWARE_LEFT_ANTI_JOIN ||
+                          JoinOpType == doris::TJoinOp::LEFT_SEMI_JOIN) {
+                while (probe_idx < probe_rows && matched_cnt < batch_size) {
+                    probe_idxs[matched_cnt] = probe_idx++;
+                    build_idxs[matched_cnt] = 0;
+                    matched_cnt++;
+                }
+
+                if constexpr (!with_other_conjuncts) {
+                    mark_column->resize_fill(matched_cnt,
+                                             JoinOpType != 
doris::TJoinOp::LEFT_SEMI_JOIN);
+                }
+            } else {
+                LOG(FATAL) << "CROSS JOIN SHOULD NOT BUILD HASH TABLE";

Review Comment:
   do not log fatal



-- 
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.

To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


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

Reply via email to