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

Function getTypesFromArgument

src/TableFunctions/TableFunctionValues.cpp:75–82  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

73}
74
75DataTypes getTypesFromArgument(const ASTPtr & arg, ContextPtr context)
76{
77 const auto & [value_field, value_type_ptr] = evaluateConstantExpression(arg, context);
78 if (const DataTypeTuple * type_tuple = typeid_cast<const DataTypeTuple *>(value_type_ptr.get()))
79 return type_tuple->getElements();
80
81 return {value_type_ptr};
82}
83
84/* values(structure, values...) - creates a temporary storage filling columns with values
85 * values is case-insensitive table function.

Callers 1

parseArgumentsMethod · 0.85

Calls 3

getMethod · 0.45
getElementsMethod · 0.45

Tested by

no test coverage detected