luozenglin commented on a change in pull request #6918:
URL: https://github.com/apache/incubator-doris/pull/6918#discussion_r735115727
##########
File path: be/test/exprs/bitmap_function_test.cpp
##########
@@ -423,6 +423,29 @@ TEST_F(BitmapFunctionsTest, bitmap_has_any) {
ASSERT_EQ(expected2, result1);
}
+TEST_F(BitmapFunctionsTest, bitmap_has_all) {
+ BitmapValue bitmap1({1, 4, 5});
+ BitmapValue bitmap2({4, 5});
+ BitmapValue bitmap3;
+ StringVal string_val1 = convert_bitmap_to_string(ctx, bitmap1);
+ StringVal string_val2 = convert_bitmap_to_string(ctx, bitmap2);
+ StringVal string_val3 = convert_bitmap_to_string(ctx, bitmap3);
+
+ BooleanVal result1 = BitmapFunctions::bitmap_has_all(ctx, string_val1,
string_val2);
+ BooleanVal expected_true(true);
+ ASSERT_EQ(expected_true, result1);
+
+ BooleanVal result2 = BitmapFunctions::bitmap_has_all(ctx, string_val2,
string_val1);
+ BooleanVal expected_false(false);
+ ASSERT_EQ(expected_false, result2);
+
+ BooleanVal result3 = BitmapFunctions::bitmap_has_all(ctx, string_val1,
string_val3);
+ ASSERT_EQ(expected_true, result3);
+
+ BooleanVal result4 = BitmapFunctions::bitmap_has_all(ctx, string_val3,
string_val2);
+ ASSERT_EQ(expected_false, result4);
Review comment:
done
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]