the-other-tim-brown commented on code in PR #13652:
URL: https://github.com/apache/hudi/pull/13652#discussion_r2246119536


##########
hudi-client/hudi-spark-client/src/main/scala/org/apache/spark/sql/execution/datasources/parquet/HoodieParquetFileFormatHelper.scala:
##########
@@ -119,16 +170,7 @@ object HoodieParquetFileFormatHelper {
         if (typeChangeInfos.containsKey(i)) {
           val srcType = typeChangeInfos.get(i).getRight
           val dstType = typeChangeInfos.get(i).getLeft
-          val needTimeZone = Cast.needsTimeZone(srcType, dstType)
-
-          // work around for the case when cast float to double
-          if (srcType == FloatType && dstType == DoubleType) {
-            // first cast to string and then to double
-            val toStringAttr = Cast(attr, StringType, if (needTimeZone) 
timeZoneId else None)
-            Cast(toStringAttr, dstType, if (needTimeZone) timeZoneId else None)
-          } else {
-            Cast(attr, dstType, if (needTimeZone) timeZoneId else None)
-          }
+          repairFloatDoubleConversion(attr, srcType, dstType)

Review Comment:
   Does this mean that float-double is the only conversion handled?



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

Reply via email to