johanl-db commented on code in PR #44513:
URL: https://github.com/apache/spark/pull/44513#discussion_r1437160457


##########
sql/core/src/main/java/org/apache/spark/sql/execution/datasources/parquet/VectorizedColumnReader.java:
##########
@@ -152,32 +152,50 @@ private boolean isLazyDecodingSupported(
     switch (typeName) {
       case INT32: {
         boolean isDate = logicalTypeAnnotation instanceof 
DateLogicalTypeAnnotation;
-        boolean needsUpcast = sparkType == LongType || (isDate && sparkType == 
TimestampNTZType) ||
-          !DecimalType.is32BitDecimalType(sparkType);
+        boolean isDecimal = logicalTypeAnnotation instanceof 
DecimalLogicalTypeAnnotation;
+        boolean needsUpcast = sparkType == LongType || sparkType == DoubleType 
||
+          (isDate && sparkType == TimestampNTZType) ||
+          (isDecimal && !DecimalType.is32BitDecimalType(sparkType));

Review Comment:
   This fixes an issue from https://github.com/apache/spark/pull/44368, we were 
incorrectly disabling lazy dictionary decoding for any non-decimal (INT32) type



-- 
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.

To unsubscribe, e-mail: [email protected]

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