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

clickhouse: Enums in selects are parsed incorrectly #1719

Closed
pkit opened this issue Jun 4, 2023 · 0 comments
Closed

clickhouse: Enums in selects are parsed incorrectly #1719

pkit opened this issue Jun 4, 2023 · 0 comments

Comments

@pkit
Copy link
Contributor

pkit commented Jun 4, 2023

An example from ClickHouse docs:

SELECT JSONExtract(
    '{"day": "Thursday"}',
    'day',
    'Enum8(\'Sunday\' = 0, \'Monday\' = 1, \'Tuesday\' = 2, \'Wednesday\' = 3, \'Thursday\' = 4, \'Friday\' = 5, \'Saturday\' = 6)'
)
-- Expecting ). Line 1, Col: 64.
--   SELECT JSONExtract('{"day": "Thursday"}', 'day', 'Enum8(\'�[4mSunday�[0m\' = 0, \'Monday\' = 1, \'Tuesday\' = 2, \'Wednesday\' = 3, \'Thursday\' = 4, \'Friday\' = 5, \'Satu
-- 
-- Invalid expression / Unexpected token. Line 1, Col: 65.
--   SELECT JSONExtract('{"day": "Thursday"}', 'day', 'Enum8(\'Sunday�[4m\�[0m' = 0, \'Monday\' = 1, \'Tuesday\' = 2, \'Wednesday\' = 3, \'Thursday\' = 4, \'Friday\' = 5, \'Satur

@tobymao tobymao closed this as completed in 4f31a50 Jun 4, 2023
adrianisk pushed a commit to adrianisk/sqlglot that referenced this issue Jun 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant