Skip to content

Commit

Permalink
update case
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangstar333 committed Mar 18, 2024
1 parent 7fdf56d commit 07b96b9
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 9 deletions.
21 changes: 13 additions & 8 deletions be/test/vec/function/function_string_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -174,15 +174,20 @@ TEST(function_string_test, function_string_repeat_test) {
std::string func_name = "repeat";
InputTypeSet input_types = {TypeIndex::String, TypeIndex::Int32};

DataSet data_set = {
{{std::string("a"), 3}, std::string("aaa")},
{{std::string("hel lo"), 2}, std::string("hel lohel lo")},
{{std::string("hello word"), -1}, std::string("")},
{{std::string(""), 1}, std::string("")},
{{std::string("a"), 1073741825}, std::string("aaaaaaaaaa")}, // ut repeat max num 10
{{std::string("HELLO,!^%"), 2}, std::string("HELLO,!^%HELLO,!^%")},
{{std::string(""), 2}, std::string("你你")}};
DataSet data_set = {{{std::string("a"), 3}, std::string("aaa")},
{{std::string("hel lo"), 2}, std::string("hel lohel lo")},
{{std::string("hello word"), -1}, std::string("")},
{{std::string(""), 1}, std::string("")},
{{std::string("HELLO,!^%"), 2}, std::string("HELLO,!^%HELLO,!^%")},
{{std::string(""), 2}, std::string("你你")}};
static_cast<void>(check_function<DataTypeString, true>(func_name, input_types, data_set));

{
DataSet data_set = {{{std::string("a"), 1073741825},
std::string("aaaaaaaaaa")}}; // ut repeat max num 10
Status st = check_function<DataTypeString, true>(func_name, input_types, data_set, true);
EXPECT_NE(Status::OK(), st);
}
}

TEST(function_string_test, function_string_reverse_test) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ suite("max_msg_size_of_result_receiver") {
ENGINE=OLAP DISTRIBUTED BY HASH(id)
PROPERTIES("replication_num"="1")
"""

sql """
set repeat_max_num = 1000*1000*105;
"""
sql """
INSERT INTO ${table_name} VALUES (104, repeat("a", ${MESSAGE_SIZE_BASE * 104}))
"""
Expand Down

0 comments on commit 07b96b9

Please sign in to comment.