[fix](bitmap) fix wrong result of bitmap_or for null (#17456)

Result of select bitmap_to_string(bitmap_or(to_bitmap(1), null)) should be 1 instead of null.

This PR fix logic of bitmap_or and bitmap_or_count.

Other count related funcitons should also be checked and fix, they will be fixed in another PR.
This commit is contained in:
TengJianPing
2023-03-08 16:29:01 +08:00
committed by GitHub
parent 36b6cea462
commit eea6d770d7
8 changed files with 877 additions and 142 deletions

View File

@ -118,7 +118,7 @@ TEST(function_bitmap_test, function_bitmap_or_count) {
DataSet data_set = {{{&bitmap1, &bitmap2, &empty_bitmap}, (int64_t)5}, //0,1,33,1024,2019
{{&bitmap1, &bitmap2, &bitmap3},
(int64_t)7}, //0,1,5,33,1024,2019,18446744073709551615
{{&bitmap1, &empty_bitmap, Null()}, Null()},
{{&bitmap1, &empty_bitmap, Null()}, (int64_t)3},
{{&bitmap1, &bitmap3, &bitmap3},
(int64_t)6}}; //1,5,33,1024,2019,18446744073709551615