GitHub user gatorsmile opened a pull request:
https://github.com/apache/spark/pull/14148
[SPARK-16482] [SQL] Describe Table Command for Tables Requiring Runtime
Inferred Schema
#### What changes were proposed in this pull request?
If we create a table pointing to a parquet/json datasets without specifying
the schema, describe table command does not show the schema at all. It only
shows `# Schema of this table is inferred at runtime`. In 1.6, describe table
does show the schema of such a table.
For data source tables, to infer the schema, we need to load the data
source tables at runtime. Thus, this PR calls the function `lookupRelation`.
#### How was this patch tested?
Added test cases
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/gatorsmile/spark describeSchema
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/14148.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 #14148
----
commit 57893bdf55146c4ecd0a6d72c69ec3d3e85b5207
Author: gatorsmile <[email protected]>
Date: 2016-07-11T22:30:11Z
fix
commit 6f2deb3405b119aff1c88cab19d3953a7ede0408
Author: gatorsmile <[email protected]>
Date: 2016-07-11T22:55:18Z
another fix way
commit d92ebcdfd7e525499e0c8b491eeab416ad12ecfd
Author: gatorsmile <[email protected]>
Date: 2016-07-12T04:00:20Z
another fix way
----
---
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]