yihua commented on code in PR #13714:
URL: https://github.com/apache/hudi/pull/13714#discussion_r2271317435


##########
hudi-client/hudi-spark-client/src/main/scala/org/apache/spark/sql/execution/datasources/parquet/HoodieParquetFileFormatHelper.scala:
##########
@@ -127,7 +133,14 @@ object HoodieParquetFileFormatHelper {
         case (FloatType, DoubleType) =>
           val toStr = Cast(expr, StringType, if (needTimeZone) timeZoneId else 
None)
           Cast(toStr, dstType, if (needTimeZone) timeZoneId else None)
-        case (s: StructType, d: StructType) if hasFloatToDoubleConversion(s, 
d) =>
+        case (IntegerType | LongType | FloatType | DoubleType, dec: 
DecimalType) =>
+          val toStr = Cast(expr, StringType, if (needTimeZone) timeZoneId else 
None)
+          Cast(toStr, dec, if (needTimeZone) timeZoneId else None)

Review Comment:
   So this is the place where we discussed that the type promotion logic has to 
be implemented in each engine-specific schema evolution logic now.



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