We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 93f43ad commit 13a7846Copy full SHA for 13a7846
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/Cast.scala
@@ -149,6 +149,10 @@ object Cast {
149
case (f, t) if legalNumericPrecedence(f, t) => true
150
case (DateType, TimestampType) => true
151
case (_, StringType) => true
152
+ // Spark supports casting between long and timestamp, please see `longToTimestamp` and
153
+ // `timestampToLong` for details.
154
+ case (TimestampType, LongType) => true
155
+ case (LongType, TimestampType) => true
156
// TODO: consider complex types.
157
case _ => false
158
}
0 commit comments