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

Function create

src/DataTypes/DataTypeMap.cpp:236–248  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

234}
235
236static DataTypePtr create(const ASTPtr & arguments)
237{
238 if (!arguments || arguments->children.size() != 2)
239 throw Exception(ErrorCodes::NUMBER_OF_ARGUMENTS_DOESNT_MATCH, "Map data type family must have two arguments: key and value types");
240
241 DataTypes nested_types;
242 nested_types.reserve(arguments->children.size());
243
244 for (const ASTPtr & child : arguments->children)
245 nested_types.emplace_back(DataTypeFactory::instance().get(child));
246
247 return std::make_shared<DataTypeMap>(nested_types);
248}
249
250
251void registerDataTypeMap(DataTypeFactory & factory)

Callers 15

doGetSerializationMethod · 0.70
doGetSerializationMethod · 0.70
createColumnMethod · 0.70
createColumnMethod · 0.70
doGetSerializationMethod · 0.70
flattenTupleColumnImplFunction · 0.70
flattenTupleFunction · 0.70
unwrapNullableTupleFunction · 0.70
flattenImplFunction · 0.70

Calls 5

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

Tested by 15

TESTFunction · 0.40
runCollapsedProfileFunction · 0.40
makeDistinctKeyChunkFunction · 0.40
makeSortedGroupedChunkFunction · 0.40
oneColumnSourceFunction · 0.40
TEST_FFunction · 0.40
makeHeaderFunction · 0.40
SingleValueSourceMethod · 0.40
TESTFunction · 0.40
uint32HeaderMethod · 0.40
dateHeaderMethod · 0.40
TESTFunction · 0.40