Skip to content

Commit 442ffe0

Browse files
passdown the schema for Parquet File in HiveContext
1 parent 58a82a7 commit 442ffe0

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveMetastoreCatalog.scala

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,14 +208,15 @@ private[hive] class HiveMetastoreCatalog(hive: HiveContext) extends Catalog with
208208
ParquetRelation2(
209209
paths,
210210
Map(ParquetRelation2.METASTORE_SCHEMA -> metastoreSchema.json),
211-
None,
211+
Some(metastoreSchema),
212212
Some(partitionSpec))(hive))
213213
} else {
214214
val paths = Seq(metastoreRelation.hiveQlTable.getDataLocation.toString)
215215
LogicalRelation(
216216
ParquetRelation2(
217217
paths,
218-
Map(ParquetRelation2.METASTORE_SCHEMA -> metastoreSchema.json))(hive))
218+
Map(ParquetRelation2.METASTORE_SCHEMA -> metastoreSchema.json),
219+
Some(metastoreSchema))(hive))
219220
}
220221
}
221222

0 commit comments

Comments
 (0)