Github user bersprockets commented on a diff in the pull request: https://github.com/apache/spark/pull/21169#discussion_r184569738 --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/TypeCoercion.scala --- @@ -782,6 +782,22 @@ object TypeCoercion { // Skip nodes who's children have not been resolved yet. case e if !e.childrenResolved => e + // Special rules for `to/from_utc_timestamp`. `to/from_utc_timestamp` assumes its input is + // in UTC timezone, and if input is string, it should not contain timezone. + // TODO: We should move the type coercion logic to expressions instead of a central + // place to put all the rules. + case e: FromUTCTimestamp if e.left.dataType == StringType => --- End diff -- Should these checks go in their own rule that runs before ImplicitTypeCasts?
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org