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

can't access trino-parsable data type using describe or using information_schema.columns #21264

Closed
cpcloud opened this issue Mar 26, 2024 · 1 comment

Comments

@cpcloud
Copy link
Contributor

cpcloud commented Mar 26, 2024

Accessing the type information from a struct column that contains a field with spaces in it returns a data type string that cannot be parsed by trino itself.

We rely on this type information in Ibis and right now we're unable to support structs with fields that contain spaces due to this behavior.

❯ trino --catalog memory --schema default
trino:default> create table t (x row("foo bar" bigint));
CREATE TABLE
trino:default> describe t;
 Column |        Type         | Extra | Comment
--------+---------------------+-------+---------
 x      | row(foo bar bigint) |       |
(1 row)

Query 20240326_121820_07186_nxepw, FINISHED, 1 node
Splits: 19 total, 19 done (100.00%)
0.14 [1 rows, 67B] [7 rows/s, 489B/s]

trino:default> create table s (x row(foo bar bigint));
Query 20240326_121827_07192_nxepw failed: line 1:31: mismatched input 'bigint'. Expecting: ')', ','
create table s (x row(foo bar bigint))

trino:default> select version();
 _col0
-------
 443
(1 row)

Query 20240326_121840_07202_nxepw, FINISHED, 1 node
Splits: 1 total, 1 done (100.00%)
0.03 [0 rows, 0B] [0 rows/s, 0B/s]

Is there a higher-fidelity way to access this information? How do retrieve the quoted fields?

@ebyhr
Copy link
Member

ebyhr commented Mar 26, 2024

Closing as duplicate of #19442

@ebyhr ebyhr closed this as not planned Won't fix, can't repro, duplicate, stale Mar 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants