[feature](function) Add nvl function (#9726)

This commit is contained in:
Jing Shen
2022-05-30 09:43:00 +08:00
committed by GitHub
parent 0683181fef
commit 7b98dd438d
11 changed files with 178 additions and 17 deletions

View File

@ -35,6 +35,14 @@ TEST(IfNullTest, Int_Test) {
check_function<DataTypeInt32, true>(func_name, input_types, data_set);
}
TEST(NvlTest, Int_Test) {
std::string func_name = "nvl";
InputTypeSet input_types = {TypeIndex::Int32, TypeIndex::Int32};
DataSet data_set = {{{4, 10}, 4}, {{-4, 10}, -4}, {{Null(), 5}, 5}};
check_function<DataTypeInt32, true>(func_name, input_types, data_set);
}
TEST(IfNullTest, Float_Test) {
std::string func_name = "ifnull";
InputTypeSet input_types = {TypeIndex::Float64, TypeIndex::Float64};