-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-23364][SQL]'desc table' command in spark-sql add column head display #20557
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
|
Can one of the admins verify this patch? |
| s"DESC PARTITION is not allowed on a temporary view: ${table.identifier}") | ||
| } | ||
| describeSchema(catalog.lookupRelation(table).schema, result, header = false) | ||
| describeSchema(catalog.lookupRelation(table).schema, result, header = true) |
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.
May be should add a configure like hive.cli.print.header.
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.
It's not worth yet another flag, and this is a behavior change in the output. There's no motivation for this change either.
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.
For details, see #18203
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.
Partition Information
col_name data_type comment
Partition information also takes up two rows.
I try to keep the head of the case, let rows number is displayed correctly.
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.
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.
@gatorsmile I wasn't clear -- you're saying this change is wrong because it re-adds a header that was removed in the other PR?
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.
Yeah. Hive beeline already hardcoded the header. See the https://issues.apache.org/jira/browse/SPARK-20954
|
Can I overload hive's org.apache.hive.beeline.Commands.java in spark sql package, modify the hive's hard-coded statistics rows? | # Partition Information | | | |
|
cc @liufengdb |
|
There may be some spark JDBC/ODBC drivers need to parse the returned results to get all the columns. We should avoid making changes on the returned "schema" from the server side. You can fix the issue on the client side. |
|
Well, for now, I don't have a better solution. |
Closes apache#20458 Closes apache#20530 Closes apache#20557 Closes apache#20966 Closes apache#20857 Closes apache#19694 Closes apache#18227 Closes apache#20683 Closes apache#20881 Closes apache#20347 Closes apache#20825 Closes apache#20078 Closes apache#21281 Closes apache#19951 Closes apache#20905 Closes apache#20635 Author: Sean Owen <[email protected]> Closes apache#21303 from srowen/ClosePRs.


What changes were proposed in this pull request?
Use 'desc partition_table' command in spark-sql client, i think it should add column head display.
Add 'col_name' ‘data_type’ 'comment' column head display.
fix before:

fix after:

How was this patch tested?
manual tests
Please review http://spark.apache.org/contributing.html before opening a pull request.