[function](bitmap) add function alias bitmap_andnot and bitmap_andnot_count (#24771)

This commit is contained in:
TengJianPing
2023-09-22 12:18:31 +08:00
committed by GitHub
parent c8655d1dae
commit 22616d125d
15 changed files with 272 additions and 16 deletions

View File

@ -430,6 +430,21 @@ TEST(function_bitmap_test, function_bitmap_and_not_count) {
check_function<DataTypeInt64, true>(func_name, input_types, data_set);
}
TEST(function_bitmap_test, function_bitmap_and_not_count_alias) {
std::string func_name = "bitmap_andnot_count";
InputTypeSet input_types = {TypeIndex::BitMap, TypeIndex::BitMap};
BitmapValue bitmap1({1, 2, 3});
BitmapValue bitmap2({3, 4, std::numeric_limits<uint64_t>::min()});
BitmapValue bitmap3({33, 5, std::numeric_limits<uint64_t>::max()});
BitmapValue empty_bitmap;
DataSet data_set = {{{&bitmap1, &empty_bitmap}, (int64_t)3}, //1,2,3
{{&bitmap2, Null()}, (int64_t)0},
{{&bitmap2, &bitmap3}, (int64_t)3}, //0,3,4
{{&bitmap1, &bitmap2}, (int64_t)2}}; //1,2
check_function<DataTypeInt64, true>(func_name, input_types, data_set);
}
TEST(function_bitmap_test, function_bitmap_has_all) {
std::string func_name = "bitmap_has_all";
InputTypeSet input_types = {TypeIndex::BitMap, TypeIndex::BitMap};