Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nullable(Enum('A'=1,'B'=2))::String Error Unexpected value 0 in enum #51033

Closed
UnamedRus opened this issue Jun 15, 2023 · 0 comments · Fixed by #56644
Closed

Nullable(Enum('A'=1,'B'=2))::String Error Unexpected value 0 in enum #51033

UnamedRus opened this issue Jun 15, 2023 · 0 comments · Fixed by #56644
Assignees
Labels
potential bug To be reviewed by developers and confirmed/rejected.

Comments

@UnamedRus
Copy link
Contributor

Does it reproduce on recent release?

Yes, 23.6

How to reproduce

SELECT CAST(materialize(CAST(NULL, 'Nullable(Enum(\'A\' = 1, \'B\' = 2))')), 'Nullable(String)')




0 rows in set. Elapsed: 0.002 sec.

Received exception:
Code: 36. DB::Exception: Unexpected value 0 in enum: while executing 'FUNCTION CAST(materialize(CAST(NULL, 'Nullable(Enum(\'A\' = 1, \'B\' = 2))')) :: 2, 'Nullable(String)' :: 1) -> CAST(materialize(CAST(NULL, 'Nullable(Enum(\'A\' = 1, \'B\' = 2))')), 'Nullable(String)') Nullable(String) : 0'. (BAD_ARGUMENTS)

Expected behavior

Query works

Additional context
WA

SELECT CAST(materialize(CAST(NULL, 'Nullable(Enum(\'\' = 0, \'A\' = 1, \'B\' = 2))')), 'Nullable(String)')

Query id: 6b25086b-39da-4344-8743-f8c3edfda2ab

┌─CAST(materialize(CAST(NULL, 'Nullable(Enum(\'\' = 0, \'A\' = 1, \'B\' = 2))')), 'Nullable(String)')─┐
│ ᴺᵁᴸᴸ                                                                                                │
└─────────────────────────────────────────────────────────────────────────────────────────────────────┘
@UnamedRus UnamedRus added the potential bug To be reviewed by developers and confirmed/rejected. label Jun 15, 2023
@evillique evillique self-assigned this Nov 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
potential bug To be reviewed by developers and confirmed/rejected.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants