codope commented on code in PR #13188:
URL: https://github.com/apache/hudi/pull/13188#discussion_r2052193627


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

Review Comment:
   ideally double cast should be avoided but given that spark's type conversion 
loses precision and it is not as if we are going to do this for every record 
every time, I am ok with this change.



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