Fix AggregateFunctionMerge

This commit is contained in:
Dmitry Novik 2022-11-30 15:41:11 +00:00
parent a2179d5fe9
commit 4d5868d05d

View File

@ -30,7 +30,7 @@ private:
public:
AggregateFunctionMerge(const AggregateFunctionPtr & nested_, const DataTypePtr & argument, const Array & params_)
: IAggregateFunctionHelper<AggregateFunctionMerge>({argument}, params_, createResultType())
: IAggregateFunctionHelper<AggregateFunctionMerge>({argument}, params_, createResultType(nested_))
, nested_func(nested_)
{
const DataTypeAggregateFunction * data_type = typeid_cast<const DataTypeAggregateFunction *>(argument.get());
@ -45,9 +45,9 @@ public:
return nested_func->getName() + "Merge";
}
DataTypePtr createResultType() const
static DataTypePtr createResultType(const AggregateFunctionPtr & nested_)
{
return nested_func->getResultType();
return nested_->getResultType();
}
const IAggregateFunction & getBaseAggregateFunctionWithSameStateRepresentation() const override