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

Function create

src/DataTypes/DataTypeMap.cpp:197–209  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

195}
196
197static DataTypePtr create(const ASTPtr & arguments)
198{
199 if (!arguments || arguments->children.size() != 2)
200 throw Exception("Map data type family must have two arguments: key and value types", ErrorCodes::NUMBER_OF_ARGUMENTS_DOESNT_MATCH);
201
202 DataTypes nested_types;
203 nested_types.reserve(arguments->children.size());
204
205 for (const ASTPtr & child : arguments->children)
206 nested_types.emplace_back(DataTypeFactory::instance().get(child));
207
208 return std::make_shared<DataTypeMap>(nested_types);
209}
210
211void registerDataTypeMap(DataTypeFactory & factory)
212{

Callers 1

createColumnMethod · 0.70

Calls 5

ExceptionClass · 0.50
sizeMethod · 0.45
reserveMethod · 0.45
emplace_backMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected