[Fix](Status) Make Status [[nodiscard]] and handle returned Status correctly (#23395)
This commit is contained in:
@ -50,7 +50,7 @@ TEST(function_bitmap_test, function_bitmap_min_test) {
|
||||
{{&empty_bitmap}, Null()},
|
||||
{{Null()}, Null()}};
|
||||
|
||||
check_function<DataTypeInt64, true>(func_name, input_types, data_set);
|
||||
static_cast<void>(check_function<DataTypeInt64, true>(func_name, input_types, data_set));
|
||||
}
|
||||
TEST(function_bitmap_test, function_bitmap_max_test) {
|
||||
std::string func_name = "bitmap_max";
|
||||
@ -64,7 +64,7 @@ TEST(function_bitmap_test, function_bitmap_max_test) {
|
||||
{{&empty_bitmap}, Null()},
|
||||
{{Null()}, Null()}};
|
||||
|
||||
check_function<DataTypeInt64, true>(func_name, input_types, data_set);
|
||||
static_cast<void>(check_function<DataTypeInt64, true>(func_name, input_types, data_set));
|
||||
}
|
||||
|
||||
TEST(function_bitmap_test, function_bitmap_to_string_test) {
|
||||
@ -79,7 +79,7 @@ TEST(function_bitmap_test, function_bitmap_to_string_test) {
|
||||
{{&empty_bitmap}, std::string("")},
|
||||
{{Null()}, Null()}};
|
||||
|
||||
check_function<DataTypeString, true>(func_name, input_types, data_set);
|
||||
static_cast<void>(check_function<DataTypeString, true>(func_name, input_types, data_set));
|
||||
}
|
||||
|
||||
TEST(function_bitmap_test, function_bitmap_remove) {
|
||||
@ -96,7 +96,7 @@ TEST(function_bitmap_test, function_bitmap_remove) {
|
||||
{{&bitmap2, (int64_t)6}, bitmap2_res},
|
||||
{{&bitmap1, Null()}, Null()}};
|
||||
|
||||
check_function<DataTypeBitMap, true>(func_name, input_types, data_set);
|
||||
static_cast<void>(check_function<DataTypeBitMap, true>(func_name, input_types, data_set));
|
||||
}
|
||||
}
|
||||
namespace doris {
|
||||
@ -158,7 +158,7 @@ TEST(function_bitmap_test, function_bitmap_to_base64) {
|
||||
{{&empty_bitmap}, std::string("AA==")},
|
||||
{{Null()}, Null()}};
|
||||
|
||||
check_function<DataTypeString, true>(func_name, input_types, data_set);
|
||||
static_cast<void>(check_function<DataTypeString, true>(func_name, input_types, data_set));
|
||||
}
|
||||
|
||||
EXPECT_TRUE(config::set_config("enable_set_in_bitmap_value", "true", false, true).ok());
|
||||
@ -190,7 +190,7 @@ TEST(function_bitmap_test, function_bitmap_to_base64) {
|
||||
{{&empty_bitmap}, std::string("AA==")},
|
||||
{{Null()}, Null()}};
|
||||
|
||||
check_function<DataTypeString, true>(func_name, input_types, data_set);
|
||||
static_cast<void>(check_function<DataTypeString, true>(func_name, input_types, data_set));
|
||||
}
|
||||
|
||||
{
|
||||
@ -201,7 +201,7 @@ TEST(function_bitmap_test, function_bitmap_to_base64) {
|
||||
bitmap.add(2);
|
||||
bitmap.add(3);
|
||||
DataSet data_set = {{{&bitmap}, base64}};
|
||||
check_function<DataTypeString, true>(func_name, input_types, data_set);
|
||||
static_cast<void>(check_function<DataTypeString, true>(func_name, input_types, data_set));
|
||||
}
|
||||
|
||||
// test bitmap serialize version2
|
||||
@ -216,7 +216,7 @@ TEST(function_bitmap_test, function_bitmap_to_base64) {
|
||||
{{&bitmap32_3}, std::string("DAI7MAAAAQAAIAABAAAAIAA=")},
|
||||
{{&bitmap64_3}, std::string("DQIAAAAAAjswAAABAAAfAAEAAAAfAAEAAAABAQAAAAAAAAA=")}};
|
||||
|
||||
check_function<DataTypeString, true>(func_name, input_types, data_set);
|
||||
static_cast<void>(check_function<DataTypeString, true>(func_name, input_types, data_set));
|
||||
}
|
||||
}
|
||||
|
||||
@ -268,7 +268,7 @@ TEST(function_bitmap_test, function_bitmap_from_base64) {
|
||||
{{bitmap64_base64_2}, bitmap64_2}, {{bitmap64_base64_3}, bitmap64_3},
|
||||
{{base64_empty}, empty_bitmap}, {{Null()}, Null()}};
|
||||
|
||||
check_function<DataTypeBitMap, true>(func_name, input_types, data_set);
|
||||
static_cast<void>(check_function<DataTypeBitMap, true>(func_name, input_types, data_set));
|
||||
}
|
||||
|
||||
EXPECT_TRUE(config::set_config("enable_set_in_bitmap_value", "true", false, true).ok());
|
||||
@ -286,7 +286,7 @@ TEST(function_bitmap_test, function_bitmap_from_base64) {
|
||||
{{bitmap64_base64_2}, bitmap64_2}, {{bitmap64_base64_3}, bitmap64_3},
|
||||
{{base64_empty}, empty_bitmap}, {{Null()}, Null()}};
|
||||
|
||||
check_function<DataTypeBitMap, true>(func_name, input_types, data_set);
|
||||
static_cast<void>(check_function<DataTypeBitMap, true>(func_name, input_types, data_set));
|
||||
}
|
||||
|
||||
{
|
||||
@ -295,7 +295,7 @@ TEST(function_bitmap_test, function_bitmap_from_base64) {
|
||||
bitmap.add(0);
|
||||
bitmap.add(1);
|
||||
DataSet data_set = {{{base64}, bitmap}};
|
||||
check_function<DataTypeBitMap, true>(func_name, input_types, data_set);
|
||||
static_cast<void>(check_function<DataTypeBitMap, true>(func_name, input_types, data_set));
|
||||
}
|
||||
{
|
||||
EXPECT_TRUE(config::set_config("bitmap_serialize_version", "1", false, true).ok());
|
||||
@ -307,7 +307,7 @@ TEST(function_bitmap_test, function_bitmap_from_base64) {
|
||||
"BAIAAAAAOjAAAAEAAAAAAB8AEAAAAAAAAQACAAMABAAFAAYABwAIAAkACgALAAwADQAOAA8AEAARABIAEw"
|
||||
"AUABUAFgAXABgAGQAaABsAHAAdAB4AHwABAAAAOjAAAAEAAAAAAAAAEAAAAAAA");
|
||||
DataSet data_set = {{{base64_32_v1}, bitmap32_3}, {{base64_64_v1}, bitmap64_3}};
|
||||
check_function<DataTypeBitMap, true>(func_name, input_types, data_set);
|
||||
static_cast<void>(check_function<DataTypeBitMap, true>(func_name, input_types, data_set));
|
||||
}
|
||||
{
|
||||
EXPECT_TRUE(config::set_config("bitmap_serialize_version", "2", false, true).ok());
|
||||
@ -319,7 +319,7 @@ TEST(function_bitmap_test, function_bitmap_from_base64) {
|
||||
"DQIAAAAAAjowAAABAAAAAAAfABAAAAAAAAEAAgADAAQABQAGAAcACAAJAAoACwAMAA0ADgAPABAAEQASAB"
|
||||
"MAFAAVABYAFwAYABkAGgAbABwAHQAeAB8AAQAAAAEBAAAAAAAAAA==");
|
||||
DataSet data_set = {{{base64_32_v2}, bitmap32_3}, {{base64_64_v2}, bitmap64_3}};
|
||||
check_function<DataTypeBitMap, true>(func_name, input_types, data_set);
|
||||
static_cast<void>(check_function<DataTypeBitMap, true>(func_name, input_types, data_set));
|
||||
}
|
||||
}
|
||||
|
||||
@ -333,7 +333,7 @@ TEST(function_bitmap_test, function_bitmap_and_count) {
|
||||
{{&bitmap1, &bitmap1}, (int64_t)3},
|
||||
{{&bitmap1, &bitmap2}, (int64_t)1}};
|
||||
|
||||
check_function<DataTypeInt64, true>(func_name, input_types, data_set);
|
||||
static_cast<void>(check_function<DataTypeInt64, true>(func_name, input_types, data_set));
|
||||
|
||||
{
|
||||
InputTypeSet input_types = {TypeIndex::BitMap, TypeIndex::BitMap, TypeIndex::BitMap};
|
||||
@ -347,7 +347,7 @@ TEST(function_bitmap_test, function_bitmap_and_count) {
|
||||
{{&bitmap1, &bitmap2, Null()}, (int64_t)0},
|
||||
{{&bitmap1, &bitmap3, &bitmap3}, (int64_t)1}}; //33
|
||||
|
||||
check_function<DataTypeInt64, true>(func_name, input_types, data_set);
|
||||
static_cast<void>(check_function<DataTypeInt64, true>(func_name, input_types, data_set));
|
||||
}
|
||||
}
|
||||
|
||||
@ -363,7 +363,7 @@ TEST(function_bitmap_test, function_bitmap_or_count) {
|
||||
{{&bitmap2, &bitmap3}, (int64_t)4},
|
||||
{{&bitmap1, &bitmap3}, (int64_t)3}};
|
||||
|
||||
check_function<DataTypeInt64, true>(func_name, input_types, data_set);
|
||||
static_cast<void>(check_function<DataTypeInt64, true>(func_name, input_types, data_set));
|
||||
|
||||
{
|
||||
InputTypeSet input_types = {TypeIndex::BitMap, TypeIndex::BitMap, TypeIndex::BitMap};
|
||||
@ -379,7 +379,7 @@ TEST(function_bitmap_test, function_bitmap_or_count) {
|
||||
{{&bitmap1, &bitmap3, &bitmap3},
|
||||
(int64_t)6}}; //1,5,33,1024,2019,18446744073709551615
|
||||
|
||||
check_function<DataTypeInt64, true>(func_name, input_types, data_set);
|
||||
static_cast<void>(check_function<DataTypeInt64, true>(func_name, input_types, data_set));
|
||||
}
|
||||
}
|
||||
|
||||
@ -396,7 +396,7 @@ TEST(function_bitmap_test, function_bitmap_xor_count) {
|
||||
{{&bitmap2, &bitmap3}, (int64_t)2},
|
||||
{{&bitmap1, &bitmap4}, (int64_t)2}};
|
||||
|
||||
check_function<DataTypeInt64, true>(func_name, input_types, data_set);
|
||||
static_cast<void>(check_function<DataTypeInt64, true>(func_name, input_types, data_set));
|
||||
|
||||
{
|
||||
InputTypeSet input_types = {TypeIndex::BitMap, TypeIndex::BitMap, TypeIndex::BitMap};
|
||||
@ -411,7 +411,7 @@ TEST(function_bitmap_test, function_bitmap_xor_count) {
|
||||
{{&bitmap1, &empty_bitmap, Null()}, (int64_t)0},
|
||||
{{&bitmap1, &bitmap3, &bitmap3}, (int64_t)3}}; //1,1024,2019
|
||||
|
||||
check_function<DataTypeInt64, true>(func_name, input_types, data_set);
|
||||
static_cast<void>(check_function<DataTypeInt64, true>(func_name, input_types, data_set));
|
||||
}
|
||||
}
|
||||
|
||||
@ -428,7 +428,7 @@ TEST(function_bitmap_test, function_bitmap_and_not_count) {
|
||||
{{&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);
|
||||
static_cast<void>(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";
|
||||
@ -443,7 +443,7 @@ TEST(function_bitmap_test, function_bitmap_and_not_count_alias) {
|
||||
{{&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);
|
||||
static_cast<void>(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";
|
||||
@ -465,7 +465,7 @@ TEST(function_bitmap_test, function_bitmap_has_all) {
|
||||
{{&bitmap4, &bitmap5}, uint8(true)},
|
||||
{{Null(), &empty_bitmap1}, Null()}};
|
||||
|
||||
check_function<DataTypeUInt8, true>(func_name, input_types, data_set);
|
||||
static_cast<void>(check_function<DataTypeUInt8, true>(func_name, input_types, data_set));
|
||||
}
|
||||
|
||||
} // namespace doris::vectorized
|
||||
|
||||
Reference in New Issue
Block a user