GitHub user gatorsmile opened a pull request:
https://github.com/apache/spark/pull/17394
[SPARK-20067] [SQL] Use treeString to print out the table schema for
CatalogTable
### What changes were proposed in this pull request?
Follow what we did in Dataset API `printSchema`, we can use `treeString` to
show the schema in the more readable way. It impacts the DDL commands like
`SHOW TABLE EXTENDED` and `DESC EXTENDED`.
Below is the current way:
```
Schema: STRUCT<`a`: STRING (nullable = true), `b`: INT (nullable = true),
`c`: STRING (nullable = true), `d`: STRING (nullable = true)>
```
After the change, it should look like
```
Schema: root
|-- a: string (nullable = true)
|-- b: integer (nullable = true)
|-- c: string (nullable = true)
|-- d: string (nullable = true)
```
### How was this patch tested?
`describe.sql` and `show-tables.sql`
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/gatorsmile/spark descFollowUp
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/17394.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #17394
----
commit 2ebeac854144aa4a036cac9e309c5927677b6656
Author: Xiao Li <[email protected]>
Date: 2017-03-23T02:41:49Z
fix.
commit 87209193557d363412bf4041cddeb86d60affaf4
Author: Xiao Li <[email protected]>
Date: 2017-03-23T05:39:24Z
improve
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]