```
:) CREATE TEMPORARY TABLE test (x enum('a', 'b'))

CREATE TEMPORARY TABLE test
(
    `x` enum('a', 'b')
)

Query id: 081d03e8-9945-4b0c-a906-4477f4b45d64


0 rows in set. Elapsed: 0.005 sec. 

Received exception from server (version 22.4.1):
Code: 223. DB::Exception: Received from localhost:9000. DB::Exception: Elements of Enum data type must be of form: 'name' = number, where name is string literal and number is an integer. (UNEXPECTED_AST_STRUCTURE)
```
{
    UInt64 literal_child_count = 0;
    UInt64 func_child_count = 0;
    ASTs assign_number_child;
    assign_number_child.reserve(arguments->children.size());
    for (const ASTPtr & child : arguments->children)
    {
        if (child->as<ASTLiteral>())
        {
            ASTPtr func = makeASTFunction("equals", child, std::make_shared<ASTLiteral>(++literal_child_count));
            assign_number_child.emplace_back(func);
        }
        else
        {
            ++func_child_count;
            assign_number_child.emplace_back(child);
        }
    }
    if (func_child_count > 0 && literal_child_count > 0)
        throw Exception("ALL Elements of Enum data type must be of form: 'name' = number or 'name', where name is string literal and number is an integer",
                        ErrorCodes::UNEXPECTED_AST_STRUCTURE);
    arguments->children = assign_number_child;
}
template <typename DataTypeEnum>
static DataTypePtr createExact(const ASTPtr & arguments)