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

Postgres: arrays of JSONB raise parsing errors #1903

Closed
vmax opened this issue Jul 10, 2023 · 0 comments
Closed

Postgres: arrays of JSONB raise parsing errors #1903

vmax opened this issue Jul 10, 2023 · 0 comments

Comments

@vmax
Copy link

vmax commented Jul 10, 2023

Before you file an issue
[x] Make sure you specify the "read" dialect eg. parse_one(sql, read="spark")
[x] Check if the issue still exists on main

Fully reproducible code snippet

import sqlglot
sqlglot.parse("CREATE TABLE test ( elems jsonb[] )", read="postgres")

raises:

ParseError: Failed to parse 'JSONB' into <class 'sqlglot.expressions.DataType'>

Official Documentation

https://www.postgresql.org/docs/current/arrays.html

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

Successfully merging a pull request may close this issue.

1 participant