cloud-fan commented on a change in pull request #31960:
URL: https://github.com/apache/spark/pull/31960#discussion_r622691560



##########
File path: 
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/parquet/ParquetSchemaConverter.scala
##########
@@ -144,7 +141,7 @@ class ParquetToSparkSchemaConverter(
         originalType match {
           case INT_64 | null => LongType
           case DECIMAL => makeDecimalType(Decimal.MAX_LONG_DIGITS)
-          case UINT_64 => typeNotSupported()
+          case UINT_64 => DecimalType.LongDecimal

Review comment:
       I don't think it's related to `DecimalType.LongDecimal`. We want it to 
store uint64, so the precision we need is 
`java.lang.Long.toUnsignedString(-1).length`, which is 20.
   
   Let's make it more explicit
   ```
   // The precision to hold the largest unsigned long is: 
`java.lang.Long.toUnsignedString(-1).length` = 20
   case UINT_64 => DecimalType(20, 0)
   ```




-- 
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:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to