mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 16:42:05 +00:00
Fix AggregateFunctionMinMaxAny::createResultType
This commit is contained in:
parent
48e8aeac01
commit
e6c283e7df
@ -1219,7 +1219,7 @@ private:
|
||||
|
||||
public:
|
||||
explicit AggregateFunctionsSingleValue(const DataTypePtr & type)
|
||||
: IAggregateFunctionDataHelper<Data, AggregateFunctionsSingleValue<Data>>({type}, {}, createResultType())
|
||||
: IAggregateFunctionDataHelper<Data, AggregateFunctionsSingleValue<Data>>({type}, {}, createResultType(type))
|
||||
, serialization(type->getDefaultSerialization())
|
||||
{
|
||||
if (StringRef(Data::name()) == StringRef("min")
|
||||
@ -1233,12 +1233,11 @@ public:
|
||||
|
||||
String getName() const override { return Data::name(); }
|
||||
|
||||
DataTypePtr createResultType() const
|
||||
static DataTypePtr createResultType(const DataTypePtr & type_)
|
||||
{
|
||||
auto result_type = this->argument_types.at(0);
|
||||
if constexpr (Data::is_nullable)
|
||||
return makeNullable(result_type);
|
||||
return result_type;
|
||||
return makeNullable(type_);
|
||||
return type_;
|
||||
}
|
||||
|
||||
void add(AggregateDataPtr __restrict place, const IColumn ** columns, size_t row_num, Arena * arena) const override
|
||||
|
Loading…
Reference in New Issue
Block a user