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 a69f4515fe7 [Bug](fix) fix coredump case in (not null, null) execpt
(not null, not null) case (#38760)
a69f4515fe7 is described below
commit a69f4515fe766bf7fa3588a15d462e1e33d75a0a
Author: HappenLee <[email protected]>
AuthorDate: Sat Aug 3 00:34:00 2024 +0800
[Bug](fix) fix coredump case in (not null, null) execpt (not null, not
null) case (#38760)
---
be/src/vec/exec/vset_operation_node.cpp | 6 ++++--
regression-test/data/query_p0/except/test_query_except.out | 2 ++
regression-test/suites/query_p0/except/test_query_except.groovy | 3 +++
3 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/be/src/vec/exec/vset_operation_node.cpp
b/be/src/vec/exec/vset_operation_node.cpp
index 0db5ce4050d..5a768835d14 100644
--- a/be/src/vec/exec/vset_operation_node.cpp
+++ b/be/src/vec/exec/vset_operation_node.cpp
@@ -597,8 +597,10 @@ Status
VSetOperationNode<is_intersect>::extract_build_column(Block& block,
block.get_by_position(result_col_id).column =
block.get_by_position(result_col_id).column->convert_to_full_column_if_const();
if (_build_not_ignore_null[i]) {
- block.get_by_position(result_col_id).column =
- make_nullable(block.get_by_position(result_col_id).column);
+ auto column_ptr =
make_nullable(block.get_by_position(result_col_id).column, false);
+ block.insert(
+ {column_ptr,
make_nullable(block.get_by_position(result_col_id).type), ""});
+ result_col_id = block.columns() - 1;
}
raw_ptrs[i] = block.get_by_position(result_col_id).column.get();
DCHECK_GE(result_col_id, 0);
diff --git a/regression-test/data/query_p0/except/test_query_except.out
b/regression-test/data/query_p0/except/test_query_except.out
index 7aea45fde18..763cb44c7f8 100644
--- a/regression-test/data/query_p0/except/test_query_except.out
+++ b/regression-test/data/query_p0/except/test_query_except.out
@@ -14,3 +14,5 @@
14
15
+-- !select_except2 --
+
diff --git a/regression-test/suites/query_p0/except/test_query_except.groovy
b/regression-test/suites/query_p0/except/test_query_except.groovy
index ff8d3e68008..1a2aa742d29 100644
--- a/regression-test/suites/query_p0/except/test_query_except.groovy
+++ b/regression-test/suites/query_p0/except/test_query_except.groovy
@@ -22,4 +22,7 @@ suite("test_query_except") {
SELECT * FROM (SELECT k1 FROM test_query_db.baseall
EXCEPT SELECT k1 FROM test_query_db.test)
a ORDER BY k1
"""
+ qt_select_except2 """
+ select not_null_k1, not_null_k1 from (SELECT
non_nullable(k1) as not_null_k1 FROM test_query_db.baseall where k1 is not
null) b1 except select non_nullable(k1), k1 from test_query_db.baseall where k1
is not null order by 1, 2;
+ """
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]