-
- Downloads
[SPARK-20482][SQL] Resolving Casts is too strict on having time zone set
## What changes were proposed in this pull request? Relax the requirement that a `TimeZoneAwareExpression` has to have its `timeZoneId` set to be considered resolved. With this change, a `Cast` (which is a `TimeZoneAwareExpression`) can be considered resolved if the `(fromType, toType)` combination doesn't require time zone information. Also de-relaxed test cases in `CastSuite` so Casts in that test suite don't get a default`timeZoneId = Option("GMT")`. ## How was this patch tested? Ran the de-relaxed`CastSuite` and it's passing. Also ran the SQL unit tests and they're passing too. Author: Kris Mok <kris.mok@databricks.com> Closes #17777 from rednaxelafx/fix-catalyst-cast-timezone.
Showing
- sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/Cast.scala 32 additions, 0 deletions...cala/org/apache/spark/sql/catalyst/expressions/Cast.scala
- sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/CastSuite.scala 2 additions, 2 deletions...org/apache/spark/sql/catalyst/expressions/CastSuite.scala
Loading
Please register or sign in to comment