Spark does not seem to read the schema from the Hive metastore for partitioned tables stored as ORC files. It appears to read the schema from the files themselves, which, if they were created with Hive, does not match the metastore schema (at least not before before Hive 2.0, see
HIVE-4243). To reproduce:
Expected result: Spark should preserve the column names that were defined in Hive.
Possibly related to