Minor include

This commit is contained in:
Raúl Marín 2024-12-02 13:23:07 +01:00
parent 9ce4ac3997
commit 8ecdfb9bc2
2 changed files with 10 additions and 6 deletions

View File

@ -1,12 +1,13 @@
#include <AggregateFunctions/AggregateFunctionFactory.h>
#include <AggregateFunctions/Combinators/AggregateFunctionCombinatorFactory.h>
#include <Core/Settings.h>
#include <DataTypes/DataTypeLowCardinality.h>
#include <DataTypes/DataTypesNumber.h>
#include <Functions/FunctionFactory.h>
#include <IO/WriteHelpers.h>
#include <Interpreters/Context.h>
#include <Parsers/ASTFunction.h>
#include <Common/CurrentThread.h>
#include <Core/Settings.h>
static constexpr size_t MAX_AGGREGATE_FUNCTION_NAME_LENGTH = 1000;
@ -349,4 +350,9 @@ AggregateFunctionFactory & AggregateFunctionFactory::instance()
return ret;
}
bool AggregateUtils::isAggregateFunction(const ASTFunction & node)
{
return AggregateFunctionFactory::instance().isAggregateFunctionName(node.name);
}
}

View File

@ -1,7 +1,6 @@
#pragma once
#include <AggregateFunctions/IAggregateFunction.h>
#include <Parsers/ASTFunction.h>
#include <Parsers/NullsAction.h>
#include <Common/IFactoryWithAliases.h>
@ -23,6 +22,8 @@ class IDataType;
using DataTypePtr = std::shared_ptr<const IDataType>;
using DataTypes = std::vector<DataTypePtr>;
class ASTFunction;
/**
* The invoker has arguments: name of aggregate function, types of arguments, values of parameters.
* Parameters are for "parametric" aggregate functions.
@ -114,10 +115,7 @@ private:
struct AggregateUtils
{
static bool isAggregateFunction(const ASTFunction & node)
{
return AggregateFunctionFactory::instance().isAggregateFunctionName(node.name);
}
static bool isAggregateFunction(const ASTFunction & node);
};
const String & getAggregateFunctionCanonicalNameIfAny(const String & name);