branch-2.1: [feature](function) support utf8 input in initcap #49846 (#49977)

This commit is contained in:
Mryange
2025-04-11 15:06:23 +08:00
committed by GitHub
parent 40a62c3b82
commit d8a274251e
3 changed files with 212 additions and 146 deletions

View File

@ -1301,4 +1301,21 @@ TEST(function_string_test, function_strcmp_test) {
}
}
TEST(function_string_test, function_initcap) {
std::string func_name {"initcap"};
InputTypeSet input_types = {TypeIndex::String};
DataSet data_set = {{{std::string("SKJ_ASD_SAD _1A")}, std::string("Skj_Asd_Sad _1a")},
{{std::string("BC'S aaaaA'' 'S")}, std::string("Bc'S Aaaaa'' 'S")},
{{std::string("NULL")}, std::string("Null")},
{{Null()}, Null()},
{{std::string("GROSSE àstanbul , ÀÇAC123 ΣΟΦΟΣ")},
std::string("Grosse Àstanbul , Àçac123 Σοφος")},
{{std::string("HELLO, WORLD!")}, std::string("Hello, World!")},
{{std::string("HHHH+-1; asAAss__!")}, std::string("Hhhh+-1; Asaass__!")},
{{std::string("a,B,C,D")}, std::string("A,B,C,D")}};
static_cast<void>(check_function<DataTypeString, true>(func_name, input_types, data_set));
}
} // namespace doris::vectorized