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

Function create

src/DataTypes/DataTypeVariant.cpp:203–215  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

201}
202
203static DataTypePtr create(const ASTPtr & arguments)
204{
205 if (!arguments || arguments->children.empty())
206 return std::make_shared<DataTypeVariant>(DataTypes{});
207
208 DataTypes nested_types;
209 nested_types.reserve(arguments->children.size());
210
211 for (const ASTPtr & child : arguments->children)
212 nested_types.emplace_back(DataTypeFactory::instance().get(child));
213
214 return std::make_shared<DataTypeVariant>(nested_types);
215}
216
217bool isVariantExtension(const DataTypePtr & from_type, const DataTypePtr & to_type)
218{

Callers 2

createColumnMethod · 0.70
doGetSerializationMethod · 0.70

Calls 5

emptyMethod · 0.45
reserveMethod · 0.45
sizeMethod · 0.45
emplace_backMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected