Skip to content

Commit 27fe18b

Browse files
committed
update
1 parent 562df87 commit 27fe18b

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

be/src/vec/aggregate_functions/aggregate_function_min_max.cpp

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -101,13 +101,11 @@ AggregateFunctionPtr create_aggregate_function_single_value_any_value_function(
101101
return res;
102102
}
103103
const DataTypePtr& argument_type = remove_nullable(argument_types[0]);
104-
if (argument_type->get_primitive_type() == PrimitiveType::TYPE_ARRAY ||
105-
argument_type->get_primitive_type() == PrimitiveType::TYPE_MAP ||
106-
argument_type->get_primitive_type() == PrimitiveType::TYPE_STRUCT ||
107-
argument_type->get_primitive_type() == PrimitiveType::TYPE_AGG_STATE ||
108-
argument_type->get_primitive_type() == PrimitiveType::TYPE_OBJECT ||
109-
argument_type->get_primitive_type() == PrimitiveType::TYPE_HLL ||
110-
argument_type->get_primitive_type() == PrimitiveType::TYPE_QUANTILE_STATE) {
104+
WhichDataType which(argument_type);
105+
if (which.idx == TypeIndex::Array || which.idx == TypeIndex::MAP ||
106+
which.idx == TypeIndex::STRUCT || which.idx == TypeIndex::AGG_STATE ||
107+
which.idx == TypeIndex::OBJECT || which.idx == TypeIndex::HLL ||
108+
which.idx == TypeIndex::QUANTILE_STATE) {
111109
return creator_without_type::create<
112110
AggregateFunctionsSingleValue<SingleValueDataComplexType>>(argument_types,
113111
result_is_nullable);

0 commit comments

Comments
 (0)