Details
-
Sub-task
-
Status: Resolved
-
Major
-
Resolution: Won't Fix
-
3.0.0
-
None
-
None
Description
Currently, when we convert an out-of-range value to a numeric type, the value is unexpected
scala> spark.sql("select cast(327689 as short)").show()
------------------------
CAST(327689 AS SMALLINT) |
------------------------
9 |
------------------------
The result is actually 327689.toShort (327689 & 0xffff).
For such cases, I think we should return null.
Attachments
Issue Links
- links to