Support bitmap_empty function (#2227)

This commit is contained in:
kangkaisen
2019-11-18 20:37:00 +08:00
committed by ZHAO Chun
parent 626001fae4
commit d8cfbbedf7
12 changed files with 67 additions and 35 deletions

View File

@ -52,6 +52,15 @@ private:
FunctionContext* ctx;
};
TEST_F(BitmapFunctionsTest, bitmap_empty) {
StringVal result = BitmapFunctions::bitmap_empty(ctx);
RoaringBitmap bitmap;
StringVal expected = convert_bitmap_to_string(ctx, bitmap);
ASSERT_EQ(expected, result);
}
TEST_F(BitmapFunctionsTest, to_bitmap) {
StringVal input = AnyValUtil::from_string_temp(ctx, std::string("1024"));
StringVal result = BitmapFunctions::to_bitmap(ctx, input);