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:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]