-
- Downloads
[SPARK-16729][SQL] Throw analysis exception for invalid date casts
## What changes were proposed in this pull request? Spark currently throws exceptions for invalid casts for all other data types except date type. Somehow date type returns null. It should be consistent and throws analysis exception as well. ## How was this patch tested? Added a unit test case in CastSuite. Author: petermaxlee <petermaxlee@gmail.com> Closes #14358 from petermaxlee/SPARK-16729.
Showing
- sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/Cast.scala 2 additions, 7 deletions...cala/org/apache/spark/sql/catalyst/expressions/Cast.scala
- sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/CastSuite.scala 14 additions, 2 deletions...org/apache/spark/sql/catalyst/expressions/CastSuite.scala
Loading
Please register or sign in to comment