[optimization](array-type) array_min/array_max function support the date/datetime type (#13407)

This pr is used to expand the supported data type for array_min/array_max function.
Before the change , the array_min/array_max function can't support the date/datetime type.
After the change, array_min/array_max function can support the date/datetime type.
Co-authored-by: hucheng01 <hucheng01@baidu.com>
This commit is contained in:
carlvinhust2012
2022-10-17 23:38:20 +08:00
committed by GitHub
parent dbf71ed3be
commit 49b060418a
4 changed files with 32 additions and 19 deletions

View File

@ -166,7 +166,11 @@ struct ArrayAggregateImpl {
execute_type<Int128>(res, type, data, offsets) ||
execute_type<Float32>(res, type, data, offsets) ||
execute_type<Float64>(res, type, data, offsets) ||
execute_type<Decimal128>(res, type, data, offsets)) {
execute_type<Decimal128>(res, type, data, offsets) ||
execute_type<Date>(res, type, data, offsets) ||
execute_type<DateTime>(res, type, data, offsets) ||
execute_type<DateV2>(res, type, data, offsets) ||
execute_type<DateTimeV2>(res, type, data, offsets)) {
block.replace_by_position(result, std::move(res));
return Status::OK();
} else {