This is an automated email from the ASF dual-hosted git repository.
yiguolei 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 73ed83302b2 [fix](join) core caused by null-safe-equal join (#32623)
(#32821)
73ed83302b2 is described below
commit 73ed83302b217c44db57be2e72e650f1e2478854
Author: Jerry Hu <[email protected]>
AuthorDate: Wed Mar 27 09:49:28 2024 +0800
[fix](join) core caused by null-safe-equal join (#32623) (#32821)
---
be/src/vec/exec/join/vhash_join_node.cpp | 2 +-
.../data/query_p0/join/test_half_join_nullable_build_side.out | 8 ++++++++
.../query_p0/join/test_half_join_nullable_build_side.groovy | 9 +++++++++
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 8b52608433c..b16ef0cc504 100644
--- a/be/src/vec/exec/join/vhash_join_node.cpp
+++ b/be/src/vec/exec/join/vhash_join_node.cpp
@@ -1290,7 +1290,7 @@ void HashJoinNode::_hash_table_init(RuntimeState* state) {
}
auto is_null = data_type->is_nullable();
- has_null |= is_null;
+ has_null |= is_null ||
_should_convert_build_side_to_nullable[i];
_build_key_sz[i] =
data_type->get_maximum_size_of_value_in_memory() -
(is_null ? 1 : 0);
_probe_key_sz[i] = _build_key_sz[i];
diff --git
a/regression-test/data/query_p0/join/test_half_join_nullable_build_side.out
b/regression-test/data/query_p0/join/test_half_join_nullable_build_side.out
index 6f7d74acd37..8404bee641f 100644
--- a/regression-test/data/query_p0/join/test_half_join_nullable_build_side.out
+++ b/regression-test/data/query_p0/join/test_half_join_nullable_build_side.out
@@ -126,3 +126,11 @@
2 111 111
3 1111 1111
+-- !sql30 --
+1 11 11 1 11 11
+2 111 111 4 111 111
+2 111 111 2 111 111
+3 1111 1111 3 1111 1111
+4 \N \N \N \N \N
+5 1111 1111 3 1111 1111
+
diff --git
a/regression-test/suites/query_p0/join/test_half_join_nullable_build_side.groovy
b/regression-test/suites/query_p0/join/test_half_join_nullable_build_side.groovy
index bddccb26ab1..a828980b381 100644
---
a/regression-test/suites/query_p0/join/test_half_join_nullable_build_side.groovy
+++
b/regression-test/suites/query_p0/join/test_half_join_nullable_build_side.groovy
@@ -277,4 +277,13 @@ suite("test_half_join_nullable_build_side", "query,p0") {
test_half_join_nullable_build_side_l2 l right semi join
test_half_join_nullable_build_side_r2 r on l.v2 = r.v2
order by 1, 2, 3;
"""
+
+ qt_sql30 """
+ select
+ *
+ from
+ test_half_join_nullable_build_side_l2 l
+ left join test_half_join_nullable_build_side_l r on l.v2 <=> r.v2
+ order by 1, 2, 3, 4 desc;
+ """
}
\ No newline at end of file
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]