mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-29 21:20:49 +00:00
Update src/AggregateFunctions/AggregateFunctionSumMap.cpp
Co-Authored-By: Alexander Kuzmenkov <36882414+akuzm@users.noreply.github.com>
This commit is contained in:
parent
6244270809
commit
fcacca68d7
@ -56,6 +56,9 @@ SumMapArgs parseArguments(const std::string & name, const DataTypes & arguments)
|
|||||||
|
|
||||||
if (arguments.size() == 1)
|
if (arguments.size() == 1)
|
||||||
{
|
{
|
||||||
|
// sumMap is a transitive function, so it can be stored in SimpleAggregateFunction columns.
|
||||||
|
// There is a caveat: it must support sumMap(sumMap(...)), e.g. it must be able to accept its
|
||||||
|
// own output as an input. This is why we also support Tuple(keys, values) as an argument.
|
||||||
const auto * tuple_type = checkAndGetDataType<DataTypeTuple>(arguments[0].get());
|
const auto * tuple_type = checkAndGetDataType<DataTypeTuple>(arguments[0].get());
|
||||||
if (!tuple_type)
|
if (!tuple_type)
|
||||||
throw Exception("When function " + name + " gets one argument it must be a tuple",
|
throw Exception("When function " + name + " gets one argument it must be a tuple",
|
||||||
|
Loading…
Reference in New Issue
Block a user