mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 00:22:29 +00:00
dbms: explicitly disabled arguments of type AggregateFunction of aggregate functions min, max, any, anyLast family [#METR-18758].
This commit is contained in:
parent
b75d6c163a
commit
ec163175ab
@ -5,6 +5,7 @@
|
||||
|
||||
#include <DB/Columns/ColumnVector.h>
|
||||
#include <DB/Columns/ColumnString.h>
|
||||
#include <DB/DataTypes/DataTypeAggregateFunction.h>
|
||||
|
||||
#include <DB/AggregateFunctions/IUnaryAggregateFunction.h>
|
||||
|
||||
@ -541,6 +542,9 @@ public:
|
||||
void setArgument(const DataTypePtr & argument)
|
||||
{
|
||||
type = argument;
|
||||
|
||||
if (typeid_cast<const DataTypeAggregateFunction *>(type.get()))
|
||||
throw Exception("Illegal type " + type->getName() + " of argument of aggregate function " + getName(), ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user