You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2021/03/22 07:19:36 UTC
[GitHub] [spark] cloud-fan commented on a change in pull request #31921: [SPARK-34817][SQL] Read parquet unsigned types that stored as int32 physical type in parquet
cloud-fan commented on a change in pull request #31921:
URL: https://github.com/apache/spark/pull/31921#discussion_r598471813
##########
File path: sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/parquet/ParquetSchemaConverter.scala
##########
@@ -130,13 +130,11 @@ class ParquetToSparkSchemaConverter(
case INT32 =>
originalType match {
case INT_8 => ByteType
- case INT_16 => ShortType
- case INT_32 | null => IntegerType
+ case INT_16 | UINT_8 => ShortType
+ case INT_32 | UINT_16 | null => IntegerType
case DATE => DateType
case DECIMAL => makeDecimalType(Decimal.MAX_INT_DIGITS)
- case UINT_8 => typeNotSupported()
- case UINT_16 => typeNotSupported()
- case UINT_32 => typeNotSupported()
+ case UINT_32 => LongType
Review comment:
It's more about compatibility. Spark won't have unsigned types, but spark should be able to read existing parquet files written by other systems that support unsigned types.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org