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

DuckDB multidimensional array types fail to parse #1094

Closed
cpcloud opened this issue Feb 5, 2023 · 3 comments
Closed

DuckDB multidimensional array types fail to parse #1094

cpcloud opened this issue Feb 5, 2023 · 3 comments

Comments

@cpcloud
Copy link
Contributor

cpcloud commented Feb 5, 2023

In [6]: import sqlglot as sg

In [7]: sg.__version__
Out[7]: '10.5.10'

In [8]: sg.parse_one("select cast(x as bigint[][])", read="duckdb")
...
ParseError: Expecting ). Line 1, Col: 26.
  select cast(x as bigint[][])
@tobymao
Copy link
Owner

tobymao commented Feb 5, 2023

is this is a matrix ?

@tobymao
Copy link
Owner

tobymao commented Feb 5, 2023

is it equivalent to array[array[bigint]] ?

@tobymao tobymao closed this as completed in 6e182cf Feb 5, 2023
@cpcloud
Copy link
Contributor Author

cpcloud commented Feb 5, 2023

It's not a matrix, it's how duckdb spells the array type: int[] -> array<int>, int[][] -> array<array<int>> map(string, int)[] -> array<map<string, int>> etc

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

2 participants