You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2019/08/29 06:37:28 UTC
[GitHub] [spark] gengliangwang commented on a change in pull request #25615:
[SPARK-28495][SQL][FOLLOW-UP] Disallow conversions between timestamp and
long in ASNI mode
gengliangwang commented on a change in pull request #25615: [SPARK-28495][SQL][FOLLOW-UP] Disallow conversions between timestamp and long in ASNI mode
URL: https://github.com/apache/spark/pull/25615#discussion_r318906180
##########
File path: sql/catalyst/src/test/scala/org/apache/spark/sql/types/DataTypeWriteCompatibilitySuite.scala
##########
@@ -133,6 +133,18 @@ class ANSIDataTypeWriteCompatibilitySuite extends DataTypeWriteCompatibilityBase
assert(err.contains("Cannot safely cast"))
}
}
+
+ test("Conversions between timestamp and long are not allowed") {
+ assertSingleError(LongType, TimestampType, "longToTimestamp",
+ "Should not allow long to timestamp") { err =>
+ assert(err.contains("Cannot safely cast 'longToTimestamp': LongType to TimestampType"))
+ }
+
+ assertSingleError(TimestampType, LongType, "timestampToLong",
+ "Should not allow timestamp to long") { err =>
+ assert(err.contains("Cannot safely cast 'timestampToLong': TimestampType to LongType"))
+ }
+ }
Review comment:
I think so. Let's wait for the test result.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org