You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by li...@apache.org on 2022/06/23 05:27:39 UTC

[doris] branch master updated: [Bug][Vectorized] Fix coredump in other join conjunt is const expr (#10223)

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

lihaopeng 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 fa13bef3da [Bug][Vectorized] Fix coredump in other join conjunt is const expr (#10223)
fa13bef3da is described below

commit fa13bef3dabb49b19c505a4d9068bd9f690ad58b
Author: HappenLee <ha...@hotmail.com>
AuthorDate: Thu Jun 23 13:27:32 2022 +0800

    [Bug][Vectorized] Fix coredump in other join conjunt is const expr (#10223)
    
    Co-authored-by: lihaopeng <li...@baidu.com>
---
 be/src/vec/exec/join/vhash_join_node.cpp                  |  2 +-
 regression-test/data/query/join/sql/test_outer_join.out   | 15 +++++++++++++++
 regression-test/suites/query/join/sql/test_outer_join.sql |  2 ++
 3 files changed, 18 insertions(+), 1 deletion(-)

diff --git a/be/src/vec/exec/join/vhash_join_node.cpp b/be/src/vec/exec/join/vhash_join_node.cpp
index 8fd69152be..26e154be05 100644
--- a/be/src/vec/exec/join/vhash_join_node.cpp
+++ b/be/src/vec/exec/join/vhash_join_node.cpp
@@ -469,7 +469,7 @@ struct ProcessHashTableProbe {
         output_block->swap(mutable_block.to_block());
 
         // dispose the other join conjunt exec
-        {
+        if (output_block->rows()) {
             int result_column_id = -1;
             int orig_columns = output_block->columns();
             (*_join_node->_vother_join_conjunct_ptr)->execute(output_block, &result_column_id);
diff --git a/regression-test/data/query/join/sql/test_outer_join.out b/regression-test/data/query/join/sql/test_outer_join.out
new file mode 100644
index 0000000000..13feed348c
--- /dev/null
+++ b/regression-test/data/query/join/sql/test_outer_join.out
@@ -0,0 +1,15 @@
+-- This file is automatically generated. You should know what you did if you want to edit this
+-- !test_outer_join --
+\N	1
+\N	2
+\N	3
+\N	4
+\N	5
+
+-- !test_outer_join_2 --
+1	\N
+2	\N
+3	\N
+4	\N
+5	\N
+
diff --git a/regression-test/suites/query/join/sql/test_outer_join.sql b/regression-test/suites/query/join/sql/test_outer_join.sql
new file mode 100644
index 0000000000..10b0e86669
--- /dev/null
+++ b/regression-test/suites/query/join/sql/test_outer_join.sql
@@ -0,0 +1,2 @@
+select b.k1, c.k1 from test_join b right join test_join c on b.k1 = c.k1 and 2=4  order by 1,2;
+select b.k1, c.k1 from test_join b left join test_join c on b.k1 = c.k1 and 2=4  order by 1,2;


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