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 2021/06/20 18:01:30 UTC
[GitHub] [spark] sarutak commented on a change in pull request #32978: [SPARK-35827][SQL] Show proper error message when update column types to year-month/day-time interval
sarutak commented on a change in pull request #32978:
URL: https://github.com/apache/spark/pull/32978#discussion_r654969092
##########
File path: sql/core/src/test/scala/org/apache/spark/sql/connector/AlterTableTests.scala
##########
@@ -403,8 +403,24 @@ trait AlterTableTests extends SharedSparkSession {
val t = s"${catalogAndNamespace}table_name"
withTable(t) {
sql(s"CREATE TABLE $t (id int) USING $v2Format")
- val e = intercept[AnalysisException](sql(s"ALTER TABLE $t ALTER COLUMN id TYPE interval"))
- assert(e.getMessage.contains("id to interval type"))
+ Seq(
+ "interval",
+ "interval year",
+ "interval month",
+ "interval year to month",
+ "interval day",
+ "interval hour",
+ "interval minute",
+ "interval second",
+ "interval day to second",
+ "interval day to minute",
+ "interval day to hour",
+ "interval hour to second",
+ "interval hour to minute",
+ "interval minute to second").foreach { case dtype =>
Review comment:
Ah, O.K, I'll replace them. Thanks.
--
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
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org