```
:) 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)
```
{
    if (!arguments || arguments->children.empty())
        throw Exception("Enum data type cannot be empty", ErrorCodes::EMPTY_DATA_PASSED);
    typename DataTypeEnum::Values values;
    values.reserve(arguments->children.size());
    using FieldType = typename DataTypeEnum::FieldType;
    autoAssignNumberForEnum(arguments);
    
    for (const ASTPtr & child : arguments->children)
    {
        checkASTStructure(child);
        const auto * func = child->as<ASTFunction>();
        const auto * name_literal = func->arguments->children[0]->as<ASTLiteral>();
        const auto * value_literal = func->arguments->children[1]->as<ASTLiteral>();
        if (!name_literal
            || !value_literal
            || name_literal->value.getType() != Field::Types::String
            || (value_literal->value.getType() != Field::Types::UInt64 && value_literal->value.getType() != Field::Types::Int64))
            throw Exception("Elements of Enum data type must be of form: 'name' = number, where name is string literal and number is an integer",
                ErrorCodes::UNEXPECTED_AST_STRUCTURE);
        const String & field_name = name_literal->value.get<String>();
        const auto value = value_literal->value.get<FieldType>();
        if (value > std::numeric_limits<FieldType>::max() || value < std::numeric_limits<FieldType>::min())
            throw Exception{"Value " + toString(value) + " for element '" + field_name + "' exceeds range of " + EnumName<FieldType>::value,
                ErrorCodes::ARGUMENT_OUT_OF_BOUND};
        values.emplace_back(field_name, value);
    }
    return std::make_shared<DataTypeEnum>(values);
}
static DataTypePtr create(const ASTPtr & arguments)