-
Notifications
You must be signed in to change notification settings - Fork 189
Add Cursor.describe
to retrieve the schema of a query
#302
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
Conversation
schema='tiny', | ||
table='nation', | ||
type='varchar(152)', | ||
type_size=0, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is type_size
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not exactly sure it is returned by DESCRIBE OUTPUT
❯ trino
trino> prepare test FROM select * from tpch.tiny.customer;
PREPARE
trino> describe output test;
Column Name | Catalog | Schema | Table | Type | Type Size | Aliased
-------------+---------+--------+----------+--------------+-----------+---------
custkey | tpch | tiny | customer | bigint | 8 | false
name | tpch | tiny | customer | varchar(25) | 0 | false
address | tpch | tiny | customer | varchar(40) | 0 | false
nationkey | tpch | tiny | customer | bigint | 8 | false
phone | tpch | tiny | customer | varchar(15) | 0 | false
acctbal | tpch | tiny | customer | double | 8 | false
mktsegment | tpch | tiny | customer | varchar(10) | 0 | false
comment | tpch | tiny | customer | varchar(117) | 0 | false
(8 rows)
Query 20221214_180638_00003_8aypw, FINISHED, 1 node
Splits: 1 total, 1 done (100,00%)
0,72 [0 rows, 0B] [0 rows/s, 0B/s]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
b3c7e06
to
5986f18
Compare
5986f18
to
82b4dbd
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Looks useful. Similar to ResultSetMetaData
from JDBC land.
Description
Non-technical explanation
Release notes
( ) This is not user-visible or docs only and no release notes are required.
( ) Release notes are required, please propose a release note for me.
( ) Release notes are required, with the following suggested text: