-
Notifications
You must be signed in to change notification settings - Fork 28
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
Print result type information inspired by DuckDB DESCRIBE #190
Comments
I have implemented the prototype in #191 |
Thank you for filing this. I basically agree with your proposition and have some comments.
|
Thank you for response. I think there are options to display column names and column types.
I feel column name with verbose type can be too long, so it may be better to choose "column name with simple type name" even if
What do you think? |
All sounds good. By the way, how does duckdb show the complicated column type like We also need to think about how to show the column type with vertical result mode ( |
It seems that duckdb shows full type name in both of header and
and no type name in other output mode(default is
One interesting thing is duckdb limits column length to fit Real complex type example in
|
Thank you for sharing various tests. Regarding how we show the column type in the query result of
This might be another discussion, but I'm wondering how many users use non-default |
It is strange because |
My personal preference is to have more options for controlling the output format, but that's probably not going to be popular. |
Maybe we can consider adding more options once we find a popular use case. I'll defer to you about which style to be used by default for column type: full column type, or reduced column type. |
Yeah, I want to choose "simple type name" as the default in headers, because:
|
Sounds good! |
DuckDB has nice features about result set type.
Type names in table header.
DESCRIBE query
prints result set shape.https://duckdb.org/docs/guides/meta/describe.html#describing-a-query
Are they useful and compatible in spanner-cli?
Type names in table header
I think it is very useful because it can achieve good balance of printing type informations and keep output to simple.
I had often tried to print correct type information in spanner-cli, but it was too verbose.
#104
#174
https://github.com/olekukonko/tablewriter supports multi-line header, so it can be implemented using it.
DESCRIBE
commandResultSet.metadata.rowType
will be returned even ifQueryMode=PLAN
.It will be useful to check result set shape of queries without execution, especially query with query parameters.
DESCRIBE
(andDESC
) in spanner-cli is not documented synonym ofEXPLAIN
, so I think users will useEXPLAIN
if meaning ofDESCRIBE
will be changed.The text was updated successfully, but these errors were encountered: