branch-2.1: [Feature](function) support year of week #48870 (#49012)

This commit is contained in:
github-actions[bot]
2025-03-29 11:24:45 +08:00
committed by GitHub
parent 2ab34bfd86
commit 1259ee5088
11 changed files with 232 additions and 11 deletions

View File

@ -1759,4 +1759,16 @@ TEST(VTimestampFunctionsTest, seconds_sub_v2_test) {
}
}
TEST(VTimestampFunctionsTest, year_of_week_test) {
std::string func_name = "year_of_week";
{
InputTypeSet input_types = {TypeIndex::DateV2};
DataSet data_set = {{{std::string("2005-01-01")}, int16_t(2004)},
{{std::string("2008-12-30")}, int16_t(2009)},
{{std::string("12008-12-30")}, Null()},
{{Null()}, Null()}};
static_cast<void>(check_function<DataTypeInt16, true>(func_name, input_types, data_set));
}
}
} // namespace doris::vectorized