You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by yi...@apache.org on 2022/07/04 14:29:49 UTC

[doris] branch master updated: [bugfix] fix coredump of left anti join (#10591)

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

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


The following commit(s) were added to refs/heads/master by this push:
     new 1f1bdaa9c3 [bugfix] fix coredump of left anti join (#10591)
1f1bdaa9c3 is described below

commit 1f1bdaa9c3c962de00734e34d4674aa99c8e4780
Author: TengJianPing <18...@users.noreply.github.com>
AuthorDate: Mon Jul 4 22:29:41 2022 +0800

    [bugfix] fix coredump of left anti join (#10591)
---
 be/src/vec/exec/join/vhash_join_node.cpp | 19 +++++++++++++++----
 1 file changed, 15 insertions(+), 4 deletions(-)

diff --git a/be/src/vec/exec/join/vhash_join_node.cpp b/be/src/vec/exec/join/vhash_join_node.cpp
index 4c75eb99bd..f1b8f5b197 100644
--- a/be/src/vec/exec/join/vhash_join_node.cpp
+++ b/be/src/vec/exec/join/vhash_join_node.cpp
@@ -222,10 +222,21 @@ struct ProcessHashTableProbe {
                                                                          _build_block_rows[j]);
                                 }
                             } else {
-                                auto& column = *_build_blocks[_build_block_offsets[j]]
-                                                        .get_by_position(i)
-                                                        .column;
-                                mcol[i + column_offset]->insert_from(column, _build_block_rows[j]);
+                                if (_build_block_offsets[j] == -1) {
+                                    // the only case to reach here:
+                                    // 1. left anti join with other conjuncts, and
+                                    // 2. equal conjuncts does not match
+                                    // since nullptr is emplaced back to visited_map,
+                                    // the output value of the build side does not matter,
+                                    // just insert default value
+                                    mcol[i + column_offset]->insert_default();
+                                } else {
+                                    auto& column = *_build_blocks[_build_block_offsets[j]]
+                                                            .get_by_position(i)
+                                                            .column;
+                                    mcol[i + column_offset]->insert_from(column,
+                                                                         _build_block_rows[j]);
+                                }
                             }
                         }
                     } else {


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