MCPcopy Create free account
hub / github.com/ClickHouse/ClickHouse / rerunFunctionResolve

Function rerunFunctionResolve

src/Analyzer/Utils.cpp:932–956  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

930}
931
932void rerunFunctionResolve(FunctionNode * function_node, ContextPtr context)
933{
934 if (!function_node->isResolved())
935 throw Exception(ErrorCodes::LOGICAL_ERROR, "Trying to rerun resolve of unresolved function '{}'", function_node->getFunctionName());
936
937 const auto & name = function_node->getFunctionName();
938 if (function_node->isOrdinaryFunction())
939 {
940 // Special case, don't need to be resolved. It must be processed by GroupingFunctionsResolvePass.
941 if (name == "grouping")
942 return;
943 auto function = FunctionFactory::instance().get(name, context);
944 function_node->resolveAsFunction(function->build(function_node->getArgumentColumns()));
945 }
946 else if (function_node->isAggregateFunction())
947 {
948 if (name == "nothing" || name == "nothingUInt64" || name == "nothingNull")
949 return;
950 function_node->resolveAsAggregateFunction(resolveAggregateFunction(*function_node, function_node->getFunctionName()));
951 }
952 else if (function_node->isWindowFunction())
953 {
954 function_node->resolveAsWindowFunction(resolveAggregateFunction(*function_node, function_node->getFunctionName()));
955 }
956}
957
958namespace
959{

Callers 5

leaveImplMethod · 0.85
visitImplMethod · 0.85
enterImplMethod · 0.85

Calls 13

resolveAggregateFunctionFunction · 0.85
isOrdinaryFunctionMethod · 0.80
ExceptionClass · 0.50
isResolvedMethod · 0.45
getFunctionNameMethod · 0.45
getMethod · 0.45
resolveAsFunctionMethod · 0.45
buildMethod · 0.45
getArgumentColumnsMethod · 0.45
isAggregateFunctionMethod · 0.45

Tested by

no test coverage detected