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

Method getArgumentColumns

src/Analyzer/FunctionNode.cpp:49–84  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

47}
48
49ColumnsWithTypeAndName FunctionNode::getArgumentColumns() const
50{
51 const auto & arguments = getArguments().getNodes();
52 size_t arguments_size = arguments.size();
53
54 ColumnsWithTypeAndName argument_columns;
55 argument_columns.reserve(arguments.size());
56
57 for (size_t i = 0; i < arguments_size; ++i)
58 {
59 const auto & argument = arguments[i];
60
61 ColumnWithTypeAndName argument_column;
62
63 auto * constant = argument->as<ConstantNode>();
64 if (isNameOfInFunction(function_name) && i == 1)
65 {
66 argument_column.type = std::make_shared<DataTypeSet>();
67 if (constant)
68 {
69 /// Created but not filled for the analysis during function resolution.
70 FutureSetPtr empty_set;
71 argument_column.column = ColumnConst::create(ColumnSet::create(1, empty_set), 1);
72 }
73 }
74 else
75 argument_column.type = argument->getResultType();
76
77 if (constant && !isNotCreatable(argument_column.type))
78 argument_column.column = constant->getColumn();
79
80 argument_columns.push_back(std::move(argument_column));
81 }
82
83 return argument_columns;
84}
85
86AggregateFunctionPtr FunctionNode::getAggregateFunction() const
87{

Callers 15

mergeConditionNodesFunction · 0.45
enterImplMethod · 0.45
visitFunctionMethod · 0.45
buildCastFunctionFunction · 0.45
rerunFunctionResolveFunction · 0.45
createCastFunctionFunction · 0.45
enterImplMethod · 0.45

Calls 8

isNameOfInFunctionFunction · 0.85
getNodesMethod · 0.80
createFunction · 0.50
sizeMethod · 0.45
reserveMethod · 0.45
getResultTypeMethod · 0.45
getColumnMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected