-
- Downloads
[SPARK-2446][SQL] Add BinaryType support to Parquet I/O.
Note that this commit changes the semantics when loading in data that was created with prior versions of Spark SQL. Before, we were writing out strings as Binary data without adding any other annotations. Thus, when data is read in from prior versions, data that was StringType will now become BinaryType. Users that need strings can CAST that column to a String. It was decided that while this breaks compatibility, it does make us compatible with other systems (Hive, Thrift, etc) and adds support for Binary data, so this is the right decision long term. To support `BinaryType`, the following changes are needed: - Make `StringType` use `OriginalType.UTF8` - Add `BinaryType` using `PrimitiveTypeName.BINARY` without `OriginalType` Author: Takuya UESHIN <ueshin@happy-camper.st> Closes #1373 from ueshin/issues/SPARK-2446 and squashes the following commits: ecacb92 [Takuya UESHIN] Add BinaryType support to Parquet I/O. 616e04a [Takuya UESHIN] Make StringType use OriginalType.UTF8.
Showing
- sql/core/src/main/scala/org/apache/spark/sql/parquet/ParquetConverter.scala 1 addition, 1 deletion...scala/org/apache/spark/sql/parquet/ParquetConverter.scala
- sql/core/src/main/scala/org/apache/spark/sql/parquet/ParquetTableSupport.scala 4 additions, 0 deletions...la/org/apache/spark/sql/parquet/ParquetTableSupport.scala
- sql/core/src/main/scala/org/apache/spark/sql/parquet/ParquetTestData.scala 9 additions, 9 deletions.../scala/org/apache/spark/sql/parquet/ParquetTestData.scala
- sql/core/src/main/scala/org/apache/spark/sql/parquet/ParquetTypes.scala 32 additions, 30 deletions...ain/scala/org/apache/spark/sql/parquet/ParquetTypes.scala
- sql/core/src/test/scala/org/apache/spark/sql/parquet/ParquetQuerySuite.scala 11 additions, 5 deletions...cala/org/apache/spark/sql/parquet/ParquetQuerySuite.scala
Loading
Please register or sign in to comment