wayneguow commented on code in PR #47582:
URL: https://github.com/apache/spark/pull/47582#discussion_r1705625868


##########
connector/avro/src/main/scala/org/apache/spark/sql/avro/AvroDeserializer.scala:
##########
@@ -194,6 +200,9 @@ private[sql] class AvroDeserializer(
       case (FLOAT, FloatType) => (updater, ordinal, value) =>
         updater.setFloat(ordinal, value.asInstanceOf[Float])
 
+      case (FLOAT, DoubleType) => (updater, ordinal, value) =>
+        updater.setDouble(ordinal, value.asInstanceOf[Float].toString.toDouble)

Review Comment:
   Well, I agree to be consistent with Expression Cast to avoid unnecessary 
trouble. Update after soon.  
   
   (But actually if we want to ensure accurate calculations, we'd better avoid 
using toDouble directly.)



-- 
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: reviews-unsubscr...@spark.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to