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

Method formatColumns

src/Interpreters/InterpreterCreateQuery.cpp:410–425  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

408
409
410ASTPtr InterpreterCreateQuery::formatColumns(const NamesAndTypesList & columns)
411{
412 auto columns_list = make_intrusive<ASTExpressionList>();
413
414 for (const auto & column : columns)
415 {
416 const auto column_declaration = make_intrusive<ASTColumnDeclaration>();
417
418 column_declaration->name = column.name;
419 column_declaration->setType(dataTypeToAST(column.type));
420
421 columns_list->children.emplace_back(column_declaration);
422 }
423
424 return columns_list;
425}
426
427ASTPtr InterpreterCreateQuery::formatColumns(const NamesAndTypesList & columns, const NamesAndAliases & alias_columns)
428{

Callers

nothing calls this directly

Calls 15

dataTypeToASTFunction · 0.85
parseQueryFunction · 0.85
toColumnDefaultSpecifierFunction · 0.85
setDefaultExpressionMethod · 0.80
hasExplicitStatisticsMethod · 0.80
setStatisticsDescMethod · 0.80
getASTMethod · 0.80
FieldClass · 0.70
setTypeMethod · 0.45
emplace_backMethod · 0.45
dataMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected