-
- Downloads
[SPARK-13709][SQL] Initialize deserializer with both table and partition...
[SPARK-13709][SQL] Initialize deserializer with both table and partition properties when reading partitioned tables ## What changes were proposed in this pull request? When reading partitions of a partitioned Hive SerDe table, we only initializes the deserializer using partition properties. However, for SerDes like `AvroSerDe`, essential properties (e.g. Avro schema information) may be defined in table properties. We should merge both table properties and partition properties before initializing the deserializer. Note that an individual partition may have different properties than the one defined in the table properties (e.g. partitions within a table can have different SerDes). Thus, for any property key defined in both partition and table properties, the value set in partition properties wins. ## How was this patch tested? New test case added in `QueryPartitionSuite`. Author: Cheng Lian <lian@databricks.com> Closes #13865 from liancheng/spark-13709-partitioned-avro-table.
Showing
- sql/hive/src/main/scala/org/apache/spark/sql/hive/TableReader.scala 16 additions, 1 deletion...rc/main/scala/org/apache/spark/sql/hive/TableReader.scala
- sql/hive/src/test/scala/org/apache/spark/sql/hive/QueryPartitionSuite.scala 81 additions, 0 deletions...scala/org/apache/spark/sql/hive/QueryPartitionSuite.scala
Please register or sign in to comment