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 b5fa29e138 [fix](bitmap) incorrect result of function
'bitmap_from_array' (#22305)
b5fa29e138 is described below
commit b5fa29e13845075e270df13504422ac5adb6d2ba
Author: Jerry Hu <[email protected]>
AuthorDate: Thu Jul 27 22:44:06 2023 +0800
[fix](bitmap) incorrect result of function 'bitmap_from_array' (#22305)
---
be/src/vec/functions/function_bitmap.cpp | 2 +-
.../query_p0/sql_functions/array_functions/test_array_functions.out | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/be/src/vec/functions/function_bitmap.cpp
b/be/src/vec/functions/function_bitmap.cpp
index 8d252f77f2..578ce0e34d 100644
--- a/be/src/vec/functions/function_bitmap.cpp
+++ b/be/src/vec/functions/function_bitmap.cpp
@@ -279,8 +279,8 @@ struct BitmapFromArray {
//input is valid value
if (!null_map[i]) {
res.emplace_back(bits);
- bits.clear();
}
+ bits.clear();
}
return Status::OK();
}
diff --git
a/regression-test/data/query_p0/sql_functions/array_functions/test_array_functions.out
b/regression-test/data/query_p0/sql_functions/array_functions/test_array_functions.out
index 277cc4e883..ca027aaf71 100644
---
a/regression-test/data/query_p0/sql_functions/array_functions/test_array_functions.out
+++
b/regression-test/data/query_p0/sql_functions/array_functions/test_array_functions.out
@@ -1697,7 +1697,7 @@
[1, 2, 3, 4, 5, 4, 3, 2, 1] 1,2,3,4,5
[8, 9, NULL, 10, NULL] \N
[1, 2, 3, 3, 4, 4, NULL] \N
-[1, 2, 3] 1,2,3,4,8,9
+[1, 2, 3] 1,2,3
-- !select_union --
10005 [10005, NULL, NULL] [10005, NULL, 1, 2, 3]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]