This is an automated email from the ASF dual-hosted git repository.
kxiao pushed a commit to branch branch-2.0
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-2.0 by this push:
new 9f5fd3c7100 [Bug](join) fix mark join not output the row of null
(#29163)
9f5fd3c7100 is described below
commit 9f5fd3c710067ea764122b9d0b47272d17665b71
Author: zhangstar333 <[email protected]>
AuthorDate: Thu Dec 28 12:33:35 2023 +0800
[Bug](join) fix mark join not output the row of null (#29163)
---
.../vec/exec/join/process_hash_table_probe_impl.h | 2 +-
.../test_null_aware_left_anti_join.out | 3 ++
.../test_null_aware_left_anti_join.groovy | 53 ++++++++++++++++++++++
3 files changed, 57 insertions(+), 1 deletion(-)
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 4fc8d2a1bbf..8b1189cc5a3 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
@@ -247,7 +247,7 @@ Status
ProcessHashTableProbe<JoinOpType>::do_process(HashTableType& hash_table_c
if (current_offset < _batch_size) {
while (probe_index < probe_rows) {
if constexpr (ignore_null && need_null_map_for_probe) {
- if ((*null_map)[probe_index]) {
+ if (!is_mark_join && (*null_map)[probe_index]) {
if constexpr (probe_all) {
// only full outer / left outer need insert the
data of right table
if (LIKELY(current_offset <
_build_block_rows.size())) {
diff --git
a/regression-test/data/correctness_p0/test_null_aware_left_anti_join.out
b/regression-test/data/correctness_p0/test_null_aware_left_anti_join.out
index 1365ad992e7..a27bf59fe43 100644
--- a/regression-test/data/correctness_p0/test_null_aware_left_anti_join.out
+++ b/regression-test/data/correctness_p0/test_null_aware_left_anti_join.out
@@ -21,3 +21,6 @@
1
3
+-- !select_1 --
+320
+
diff --git
a/regression-test/suites/correctness_p0/test_null_aware_left_anti_join.groovy
b/regression-test/suites/correctness_p0/test_null_aware_left_anti_join.groovy
index eb8b075cf1d..80682e5cdf0 100644
---
a/regression-test/suites/correctness_p0/test_null_aware_left_anti_join.groovy
+++
b/regression-test/suites/correctness_p0/test_null_aware_left_anti_join.groovy
@@ -85,4 +85,57 @@ suite("test_null_aware_left_anti_join") {
select k1 from ${tableName2} t2 where t2.k1 > 2
) or k1 > 5 order by 1;
"""
+
+ sql """drop table if exists table_20_undef_undef;"""
+ sql """drop table if exists table_100_undef_undef;"""
+ sql """drop table if exists table_22_undef_undef;"""
+
+ sql """
+ create table table_20_undef_undef (
+ `pk` int,
+ `col_int_undef_signed_` int ,
+ `col_varchar_10__undef_signed_` varchar(10) ,
+ `col_varchar_1024__undef_signed_` varchar(1024)
+ ) engine=olap
+ distributed by hash(pk) buckets 10
+ properties(
+ 'replication_num' = '1');
+ """
+
+ sql """
+ create table table_100_undef_undef (
+ `pk` int,
+ `col_int_undef_signed_` int ,
+ `col_varchar_10__undef_signed_` varchar(10) ,
+ `col_varchar_1024__undef_signed_` varchar(1024)
+ ) engine=olap
+ distributed by hash(pk) buckets 10
+ properties(
+ 'replication_num' = '1');
+ """
+
+ sql """
+ create table table_22_undef_undef (
+ `pk` int,
+ `col_int_undef_signed_` int ,
+ `col_varchar_10__undef_signed_` varchar(10) ,
+ `col_varchar_1024__undef_signed_` varchar(1024)
+ ) engine=olap
+ distributed by hash(pk) buckets 10
+ properties(
+ 'replication_num' = '1');
+ """
+ sql """
+ insert into table_20_undef_undef values
(0,1,'s','y'),(1,7,'q',"something"),(2,7,'s',"time"),(3,0,'l','q'),(4,null,'e',"was"),(5,5,"about",'v'),(6,5,'a',"you're"),(7,null,"if",'n'),(8,null,"of","to"),(9,null,'g','r'),(10,6,"good","like"),(11,null,'y','t'),(12,null,'f','i'),(13,null,"like","get"),(14,7,"as","going"),(15,null,"my","of"),(16,5,"could",'b'),(17,1,'s',"or"),(18,5,'w',"it's"),(19,null,'o','n');
+ """
+ sql """
+ insert into table_100_undef_undef values
(0,1,"he",'n'),(1,null,'x','v'),(2,3,"out","her"),(3,0,"ok",'e'),(4,null,'v',"now"),(5,null,'s',"of"),(6,8,'i',"i"),(7,1,"hey",'v'),(8,1,"for","yeah"),(9,6,"oh","or"),(10,null,'l',"his"),(11,null,"well","his"),(12,7,'l','n'),(13,null,"this","at"),(14,null,'b','i'),(15,null,"no",'j'),(16,8,"mean",'n'),(17,6,"on",'k'),(18,null,"really","at"),(19,null,'l','e'),(20,null,'h','u'),(21,null,"time",'y'),(22,null,'q','s'),(23,8,"could","one"),(24,null,
[...]
+ """
+ sql """
+ insert into table_22_undef_undef values
(0,null,'z',"out"),(1,9,"was",'v'),(2,0,'w','i'),(3,7,'l',"it"),(4,9,"his",'b'),(5,null,"from","from"),(6,null,'h','h'),(7,8,'x',"then"),(8,9,'i','h'),(9,null,'o','k'),(10,1,'x',"to"),(11,null,'u',"something"),(12,null,'z',"of"),(13,null,'s',"been"),(14,5,"why",'o'),(15,3,"time","the"),(16,null,"would","not"),(17,null,"her","for"),(18,6,'w',"think"),(19,null,"at",'g'),(20,null,'z',"his"),(21,5,'l','t');
+ """
+
+ qt_select_1 """
+ SELECT COUNT(*) FROM (SELECT alias2 . `pk` AS field1 , alias1 .
`pk` AS field2 , alias2 . `pk` AS field3 , alias1 . `pk` AS field4 , alias1 .
`pk` AS field5 FROM table_20_undef_undef AS alias1 , table_100_undef_undef AS
alias2 WHERE ( alias1 . `col_int_undef_signed_` NOT IN ( SELECT SQ1_alias1 .
`pk` AS SQ1_field1 FROM table_22_undef_undef AS SQ1_alias1 ) ) AND ( alias1
. `col_varchar_1024__undef_signed_` >= "I'm" OR alias1 .
`col_varchar_1024__undef_signed_` >= "the" ) [...]
+ """
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]