mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-19 14:11:58 +00:00
Fix AggregateFunctionMerge
This commit is contained in:
parent
a2179d5fe9
commit
4d5868d05d
@ -30,7 +30,7 @@ private:
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
AggregateFunctionMerge(const AggregateFunctionPtr & nested_, const DataTypePtr & argument, const Array & params_)
|
AggregateFunctionMerge(const AggregateFunctionPtr & nested_, const DataTypePtr & argument, const Array & params_)
|
||||||
: IAggregateFunctionHelper<AggregateFunctionMerge>({argument}, params_, createResultType())
|
: IAggregateFunctionHelper<AggregateFunctionMerge>({argument}, params_, createResultType(nested_))
|
||||||
, nested_func(nested_)
|
, nested_func(nested_)
|
||||||
{
|
{
|
||||||
const DataTypeAggregateFunction * data_type = typeid_cast<const DataTypeAggregateFunction *>(argument.get());
|
const DataTypeAggregateFunction * data_type = typeid_cast<const DataTypeAggregateFunction *>(argument.get());
|
||||||
@ -45,9 +45,9 @@ public:
|
|||||||
return nested_func->getName() + "Merge";
|
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
|
const IAggregateFunction & getBaseAggregateFunctionWithSameStateRepresentation() const override
|
||||||
|
Loading…
Reference in New Issue
Block a user