This is an automated email from the ASF dual-hosted git repository.

panxiaolei pushed a commit to branch dev_join
in repository https://gitbox.apache.org/repos/asf/doris.git

commit bf503464d25da04deb3195a6fea807a79cb68825
Author: BiteTheDDDDt <[email protected]>
AuthorDate: Wed Oct 25 16:59:08 2023 +0800

    update
---
 be/src/vec/core/block.cpp                            |  8 ++++----
 be/src/vec/exec/join/process_hash_table_probe_impl.h |  1 -
 be/src/vec/exec/join/vhash_join_node.h               | 13 +++++++------
 3 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/be/src/vec/core/block.cpp b/be/src/vec/core/block.cpp
index ee889f951a1..931501d024b 100644
--- a/be/src/vec/core/block.cpp
+++ b/be/src/vec/core/block.cpp
@@ -146,7 +146,7 @@ void Block::initialize_index_by_name() {
 void Block::insert(size_t position, const ColumnWithTypeAndName& elem) {
     if (position > data.size()) {
         throw Exception(ErrorCode::INTERNAL_ERROR,
-                        "invalid input position, position={}, data.size{}, 
names={}", position,
+                        "invalid input position, position={}, data.size={}, 
names={}", position,
                         data.size(), dump_names());
     }
 
@@ -163,7 +163,7 @@ void Block::insert(size_t position, const 
ColumnWithTypeAndName& elem) {
 void Block::insert(size_t position, ColumnWithTypeAndName&& elem) {
     if (position > data.size()) {
         throw Exception(ErrorCode::INTERNAL_ERROR,
-                        "invalid input position, position={}, data.size{}, 
names={}", position,
+                        "invalid input position, position={}, data.size={}, 
names={}", position,
                         data.size(), dump_names());
     }
 
@@ -262,7 +262,7 @@ void Block::erase(const String& name) {
 ColumnWithTypeAndName& Block::safe_get_by_position(size_t position) {
     if (position >= data.size()) {
         throw Exception(ErrorCode::INTERNAL_ERROR,
-                        "invalid input position, position={}, data.size{}, 
names={}", position,
+                        "invalid input position, position={}, data.size={}, 
names={}", position,
                         data.size(), dump_names());
     }
     return data[position];
@@ -271,7 +271,7 @@ ColumnWithTypeAndName& Block::safe_get_by_position(size_t 
position) {
 const ColumnWithTypeAndName& Block::safe_get_by_position(size_t position) 
const {
     if (position >= data.size()) {
         throw Exception(ErrorCode::INTERNAL_ERROR,
-                        "invalid input position, position={}, data.size{}, 
names={}", position,
+                        "invalid input position, position={}, data.size={}, 
names={}", position,
                         data.size(), dump_names());
     }
     return data[position];
diff --git a/be/src/vec/exec/join/process_hash_table_probe_impl.h 
b/be/src/vec/exec/join/process_hash_table_probe_impl.h
index 68e3883a05b..a82e6adb8b3 100644
--- a/be/src/vec/exec/join/process_hash_table_probe_impl.h
+++ b/be/src/vec/exec/join/process_hash_table_probe_impl.h
@@ -429,7 +429,6 @@ Status ProcessHashTableProbe<JoinOpType, 
Parent>::process_data_in_hashtable(
     if (block_size) {
         for (size_t j = 0; j < right_col_len; ++j) {
             const auto& column = *_build_block->get_by_position(j).column;
-            LOG(INFO) << "happne lee build block size:" << column.size();
             mcol[j + right_col_idx]->insert_indices_from(column, 
_build_indexs.data(),
                                                          _build_indexs.data() 
+ block_size);
         }
diff --git a/be/src/vec/exec/join/vhash_join_node.h 
b/be/src/vec/exec/join/vhash_join_node.h
index ba6a8b3111e..6fb1703120e 100644
--- a/be/src/vec/exec/join/vhash_join_node.h
+++ b/be/src/vec/exec/join/vhash_join_node.h
@@ -294,19 +294,20 @@ private:
     friend struct ProcessHashTableProbe;
 
     void _init_short_circuit_for_probe() override {
+        bool empty_block = !_build_block || _build_block->empty();
         _short_circuit_for_probe =
                 (_has_null_in_build_side && _join_op == 
TJoinOp::NULL_AWARE_LEFT_ANTI_JOIN &&
                  !_is_mark_join) ||
-                (!_build_block && _join_op == TJoinOp::INNER_JOIN && 
!_is_mark_join) ||
-                (!_build_block && _join_op == TJoinOp::LEFT_SEMI_JOIN && 
!_is_mark_join) ||
-                (!_build_block && _join_op == TJoinOp::RIGHT_OUTER_JOIN) ||
-                (!_build_block && _join_op == TJoinOp::RIGHT_SEMI_JOIN) ||
-                (!_build_block && _join_op == TJoinOp::RIGHT_ANTI_JOIN);
+                (empty_block && _join_op == TJoinOp::INNER_JOIN && 
!_is_mark_join) ||
+                (empty_block && _join_op == TJoinOp::LEFT_SEMI_JOIN && 
!_is_mark_join) ||
+                (empty_block && _join_op == TJoinOp::RIGHT_OUTER_JOIN) ||
+                (empty_block && _join_op == TJoinOp::RIGHT_SEMI_JOIN) ||
+                (empty_block && _join_op == TJoinOp::RIGHT_ANTI_JOIN);
 
         //when build table rows is 0 and not have other_join_conjunct and not 
_is_mark_join and join type is one of 
LEFT_OUTER_JOIN/FULL_OUTER_JOIN/LEFT_ANTI_JOIN
         //we could get the result is probe table + null-column(if need output)
         _empty_right_table_need_probe_dispose =
-                (!_build_block && !_have_other_join_conjunct && 
!_is_mark_join) &&
+                (empty_block && !_have_other_join_conjunct && !_is_mark_join) 
&&
                 (_join_op == TJoinOp::LEFT_OUTER_JOIN || _join_op == 
TJoinOp::FULL_OUTER_JOIN ||
                  _join_op == TJoinOp::LEFT_ANTI_JOIN);
     }


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

Reply via email to