You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2021/05/04 17:25:01 UTC
[GitHub] [spark] BryanCutler commented on a change in pull request #32327: [SPARK-35211][PYTHON] Proper NumericType conversion for applySchemaToPythonRDD
BryanCutler commented on a change in pull request #32327:
URL: https://github.com/apache/spark/pull/32327#discussion_r625957662
##########
File path: sql/core/src/main/scala/org/apache/spark/sql/execution/python/EvaluatePython.scala
##########
@@ -96,37 +96,53 @@ object EvaluatePython {
case c: Short => c.toByte
case c: Int => c.toByte
case c: Long => c.toByte
+ case c: Float => c.toByte
+ case c: Double => c.toByte
}
case ShortType => (obj: Any) => nullSafeConvert(obj) {
case c: Byte => c.toShort
case c: Short => c
case c: Int => c.toShort
case c: Long => c.toShort
+ case c: Float => c.toShort
+ case c: Double => c.toShort
Review comment:
It seems odd that we would want to silently convert a double to a short. Are we sure that is the correct behavior?
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org