GitHub user liancheng opened a pull request:
https://github.com/apache/spark/pull/7199
[SPARK-8501] [SQL] Avoids reading schema from empty ORC files
ORC writes empty schema (`struct<>`) to ORC files containing zero rows.
This is OK for Hive since the table schema is managed by the metastore. But it
causes trouble when reading raw ORC files via Spark SQL since we have to
discover the schema from the files.
Notice that the ORC data source always avoids writing empty ORC files, but
it's still problematic when reading Hive tables which contain empty part-files.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/liancheng/spark spark-8501
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/7199.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 #7199
----
commit c3a4623700ee1c34f43d1716164354589a0493f4
Author: Cheng Lian <[email protected]>
Date: 2015-07-02T21:57:38Z
Avoids reading schema from empty ORC files
----
---
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]