[Chore](build) enchancement for backend build time usage (#18344)
This commit is contained in:
@ -852,51 +852,6 @@ TEST(VTimestampFunctionsTest, timediff_v2_test) {
|
||||
check_function<DataTypeTime, true>(func_name, input_types, data_set);
|
||||
}
|
||||
|
||||
{
|
||||
InputTypeSet input_types = {TypeIndex::DateV2, TypeIndex::Date};
|
||||
|
||||
DataSet data_set = {{{std::string("2019-07-18"), std::string("2019-07-18")}, 0.0},
|
||||
{{std::string("2019-07-18"), std::string("2019-07-18")}, -0.0},
|
||||
{{std::string("2019-00-18"), std::string("2019-07-18")}, Null()},
|
||||
{{std::string("2019-07-18"), std::string("2019-07-00")}, Null()}};
|
||||
|
||||
check_function<DataTypeTime, true>(func_name, input_types, data_set);
|
||||
}
|
||||
|
||||
{
|
||||
InputTypeSet input_types = {TypeIndex::Date, TypeIndex::DateV2};
|
||||
|
||||
DataSet data_set = {{{std::string("2019-07-18"), std::string("2019-07-18")}, 0.0},
|
||||
{{std::string("2019-07-18"), std::string("2019-07-18")}, -0.0},
|
||||
{{std::string("2019-00-18"), std::string("2019-07-18")}, Null()},
|
||||
{{std::string("2019-07-18"), std::string("2019-07-00")}, Null()}};
|
||||
|
||||
check_function<DataTypeTime, true>(func_name, input_types, data_set);
|
||||
}
|
||||
|
||||
{
|
||||
InputTypeSet input_types = {TypeIndex::DateTime, TypeIndex::DateV2};
|
||||
|
||||
DataSet data_set = {
|
||||
{{std::string("2019-07-18 00:00:00"), std::string("2019-07-18")}, 0.0},
|
||||
{{std::string("2019-07-18 00:00:00"), std::string("2019-07-18")}, -0.0},
|
||||
{{std::string("2019-00-18 00:00:00"), std::string("2019-07-18")}, Null()},
|
||||
{{std::string("2019-07-18 00:00:00"), std::string("2019-07-00")}, Null()}};
|
||||
|
||||
check_function<DataTypeTime, true>(func_name, input_types, data_set);
|
||||
}
|
||||
|
||||
{
|
||||
InputTypeSet input_types = {TypeIndex::DateV2, TypeIndex::DateTime};
|
||||
|
||||
DataSet data_set = {
|
||||
{{std::string("2019-07-18"), std::string("2019-07-18 00:00:00")}, 0.0},
|
||||
{{std::string("2019-07-18"), std::string("2019-07-18 00:00:00")}, -0.0},
|
||||
{{std::string("2019-00-18"), std::string("2019-07-18 00:00:00")}, Null()},
|
||||
{{std::string("2019-07-18"), std::string("2019-07-00 00:00:00")}, Null()}};
|
||||
|
||||
check_function<DataTypeTime, true>(func_name, input_types, data_set);
|
||||
}
|
||||
{
|
||||
InputTypeSet input_types = {TypeIndex::DateTimeV2, TypeIndex::DateTimeV2};
|
||||
|
||||
@ -908,57 +863,6 @@ TEST(VTimestampFunctionsTest, timediff_v2_test) {
|
||||
|
||||
check_function<DataTypeTime, true>(func_name, input_types, data_set);
|
||||
}
|
||||
|
||||
{
|
||||
InputTypeSet input_types = {TypeIndex::DateTimeV2, TypeIndex::Date};
|
||||
|
||||
DataSet data_set = {
|
||||
{{std::string("2019-07-18 00:00:00"), std::string("2019-07-18")}, 0.0},
|
||||
{{std::string("2019-07-18 00:00:10"), std::string("2019-07-18")}, 10.0},
|
||||
{{std::string("2019-00-18 00:00:00"), std::string("2019-07-18")}, Null()},
|
||||
{{std::string("2019-07-18 00:00:00"), std::string("2019-07-00")}, Null()}};
|
||||
|
||||
check_function<DataTypeTime, true>(func_name, input_types, data_set);
|
||||
}
|
||||
|
||||
{
|
||||
InputTypeSet input_types = {TypeIndex::Date, TypeIndex::DateTimeV2};
|
||||
|
||||
DataSet data_set = {
|
||||
{{std::string("2019-07-18"), std::string("2019-07-18 00:00:00")}, 0.0},
|
||||
{{std::string("2019-07-18"), std::string("2019-07-18 00:00:10")}, -10.0},
|
||||
{{std::string("2019-00-18"), std::string("2019-07-18 00:00:00")}, Null()},
|
||||
{{std::string("2019-07-18"), std::string("2019-07-00 00:00:00")}, Null()}};
|
||||
|
||||
check_function<DataTypeTime, true>(func_name, input_types, data_set);
|
||||
}
|
||||
|
||||
{
|
||||
InputTypeSet input_types = {TypeIndex::DateTime, TypeIndex::DateTimeV2};
|
||||
|
||||
DataSet data_set = {
|
||||
{{std::string("2019-07-18 00:00:00"), std::string("2019-07-18 00:00:00")}, 0.0},
|
||||
{{std::string("2019-07-18 00:00:00"), std::string("2019-07-18 00:00:10")}, -10.0},
|
||||
{{std::string("2019-00-18 00:00:00"), std::string("2019-07-18 00:00:00")}, Null()},
|
||||
{{std::string("2019-07-18 00:00:00"), std::string("2019-07-00 00:00:00")}, Null()}};
|
||||
|
||||
check_function<DataTypeTime, true>(func_name, input_types, data_set);
|
||||
}
|
||||
|
||||
{
|
||||
InputTypeSet input_types = {TypeIndex::DateTimeV2, TypeIndex::DateTime};
|
||||
|
||||
DataSet data_set = {
|
||||
{{std::string("2019-07-18 00:00:00.123"), std::string("2019-07-18 00:00:00")}, 0.0},
|
||||
{{std::string("2019-07-18 00:00:00.123"), std::string("2019-07-18 00:00:00")},
|
||||
-0.0},
|
||||
{{std::string("2019-00-18 00:00:00.123"), std::string("2019-07-18 00:00:00")},
|
||||
Null()},
|
||||
{{std::string("2019-07-18 00:00:00.123"), std::string("2019-07-00 00:00:00")},
|
||||
Null()}};
|
||||
|
||||
check_function<DataTypeTime, true>(func_name, input_types, data_set);
|
||||
}
|
||||
}
|
||||
|
||||
TEST(VTimestampFunctionsTest, datediff_v2_test) {
|
||||
@ -975,52 +879,6 @@ TEST(VTimestampFunctionsTest, datediff_v2_test) {
|
||||
check_function<DataTypeInt32, true>(func_name, input_types, data_set);
|
||||
}
|
||||
|
||||
{
|
||||
InputTypeSet input_types = {TypeIndex::DateV2, TypeIndex::Date};
|
||||
|
||||
DataSet data_set = {{{std::string("2019-07-18"), std::string("2019-07-19")}, -1},
|
||||
{{std::string("2019-07-18"), std::string("2019-07-17")}, 1},
|
||||
{{std::string("2019-00-18"), std::string("2019-07-18")}, Null()},
|
||||
{{std::string("2019-07-18"), std::string("2019-07-00")}, Null()}};
|
||||
|
||||
check_function<DataTypeInt32, true>(func_name, input_types, data_set);
|
||||
}
|
||||
|
||||
{
|
||||
InputTypeSet input_types = {TypeIndex::Date, TypeIndex::DateV2};
|
||||
|
||||
DataSet data_set = {{{std::string("2019-07-18"), std::string("2019-07-19")}, -1},
|
||||
{{std::string("2019-07-18"), std::string("2019-07-17")}, 1},
|
||||
{{std::string("2019-00-18"), std::string("2019-07-18")}, Null()},
|
||||
{{std::string("2019-07-18"), std::string("2019-07-00")}, Null()}};
|
||||
|
||||
check_function<DataTypeInt32, true>(func_name, input_types, data_set);
|
||||
}
|
||||
|
||||
{
|
||||
InputTypeSet input_types = {TypeIndex::DateTime, TypeIndex::DateV2};
|
||||
|
||||
DataSet data_set = {
|
||||
{{std::string("2019-07-18 00:00:00"), std::string("2019-07-19")}, -1},
|
||||
{{std::string("2019-07-18 00:00:00"), std::string("2019-07-17")}, 1},
|
||||
{{std::string("2019-00-18 00:00:00"), std::string("2019-07-18")}, Null()},
|
||||
{{std::string("2019-07-18 00:00:00"), std::string("2019-07-00")}, Null()}};
|
||||
|
||||
check_function<DataTypeInt32, true>(func_name, input_types, data_set);
|
||||
}
|
||||
|
||||
{
|
||||
InputTypeSet input_types = {TypeIndex::DateV2, TypeIndex::DateTime};
|
||||
|
||||
DataSet data_set = {
|
||||
{{std::string("2019-07-18"), std::string("2019-07-19 00:00:00")}, -1},
|
||||
{{std::string("2019-07-18"), std::string("2019-07-17 00:00:00")}, 1},
|
||||
{{std::string("2019-00-18"), std::string("2019-07-18 00:00:00")}, Null()},
|
||||
{{std::string("2019-07-18"), std::string("2019-07-00 00:00:00")}, Null()}};
|
||||
|
||||
check_function<DataTypeInt32, true>(func_name, input_types, data_set);
|
||||
}
|
||||
|
||||
{
|
||||
InputTypeSet input_types = {TypeIndex::DateTimeV2, TypeIndex::DateV2};
|
||||
|
||||
@ -1032,58 +890,6 @@ TEST(VTimestampFunctionsTest, datediff_v2_test) {
|
||||
|
||||
check_function<DataTypeInt32, true>(func_name, input_types, data_set);
|
||||
}
|
||||
|
||||
{
|
||||
InputTypeSet input_types = {TypeIndex::DateTimeV2, TypeIndex::Date};
|
||||
|
||||
DataSet data_set = {
|
||||
{{std::string("2019-07-18 00:00:00.123"), std::string("2019-07-19")}, -1},
|
||||
{{std::string("2019-07-18 00:00:00.123"), std::string("2019-07-17")}, 1},
|
||||
{{std::string("2019-00-18 00:00:00.123"), std::string("2019-07-18")}, Null()},
|
||||
{{std::string("2019-07-18 00:00:00.123"), std::string("2019-07-00")}, Null()}};
|
||||
|
||||
check_function<DataTypeInt32, true>(func_name, input_types, data_set);
|
||||
}
|
||||
|
||||
{
|
||||
InputTypeSet input_types = {TypeIndex::Date, TypeIndex::DateTimeV2};
|
||||
|
||||
DataSet data_set = {
|
||||
{{std::string("2019-07-18"), std::string("2019-07-19 00:00:00.123")}, -1},
|
||||
{{std::string("2019-07-18"), std::string("2019-07-17 00:00:00.123")}, 1},
|
||||
{{std::string("2019-00-18"), std::string("2019-07-18 00:00:00.123")}, Null()},
|
||||
{{std::string("2019-07-18"), std::string("2019-07-00 00:00:00.123")}, Null()}};
|
||||
|
||||
check_function<DataTypeInt32, true>(func_name, input_types, data_set);
|
||||
}
|
||||
|
||||
{
|
||||
InputTypeSet input_types = {TypeIndex::DateTime, TypeIndex::DateTimeV2};
|
||||
|
||||
DataSet data_set = {
|
||||
{{std::string("2019-07-18 00:00:00"), std::string("2019-07-19 00:00:00.123")}, -1},
|
||||
{{std::string("2019-07-18 00:00:00"), std::string("2019-07-17 00:00:00.123")}, 1},
|
||||
{{std::string("2019-00-18 00:00:00"), std::string("2019-07-18 00:00:00.123")},
|
||||
Null()},
|
||||
{{std::string("2019-07-18 00:00:00"), std::string("2019-07-00 00:00:00.123")},
|
||||
Null()}};
|
||||
|
||||
check_function<DataTypeInt32, true>(func_name, input_types, data_set);
|
||||
}
|
||||
|
||||
{
|
||||
InputTypeSet input_types = {TypeIndex::DateTimeV2, TypeIndex::DateTime};
|
||||
|
||||
DataSet data_set = {
|
||||
{{std::string("2019-07-18 00:00:00.123"), std::string("2019-07-19 00:00:00")}, -1},
|
||||
{{std::string("2019-07-18 00:00:00.123"), std::string("2019-07-17 00:00:00")}, 1},
|
||||
{{std::string("2019-00-18 00:00:00.123"), std::string("2019-07-18 00:00:00")},
|
||||
Null()},
|
||||
{{std::string("2019-07-18 00:00:00.123"), std::string("2019-07-00 00:00:00")},
|
||||
Null()}};
|
||||
|
||||
check_function<DataTypeInt32, true>(func_name, input_types, data_set);
|
||||
}
|
||||
}
|
||||
|
||||
TEST(VTimestampFunctionsTest, date_format_v2_test) {
|
||||
|
||||
Reference in New Issue
Block a user