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

Function checkASTStructure

src/DataTypes/DataTypeEnum.cpp:220–230  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

218template class DataTypeEnum<Int16>;
219
220static void checkASTStructure(const ASTPtr & child)
221{
222 const auto * func = child->as<ASTFunction>();
223 if (!func
224 || func->name != "equals"
225 || func->parameters
226 || !func->arguments
227 || func->arguments->children.size() != 2)
228 throw Exception(ErrorCodes::UNEXPECTED_AST_STRUCTURE, "Elements of Enum data type must be of form: "
229 "'name' = number, where name is string literal and number is an integer");
230}
231
232struct EnumElementLiterals
233{

Callers 2

getEnumElementLiteralsFunction · 0.85
createFunction · 0.85

Calls 2

ExceptionClass · 0.50
sizeMethod · 0.45

Tested by

no test coverage detected