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/07/06 08:13:06 UTC

[GitHub] [spark] MaxGekk commented on a change in pull request #33217: [SPARK-36023][SPARK-35735][SPARK-35768][SQL] Refactor code about parse string to DT/YM

MaxGekk commented on a change in pull request #33217:
URL: https://github.com/apache/spark/pull/33217#discussion_r664334418



##########
File path: sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/CastSuiteBase.scala
##########
@@ -1249,7 +1257,12 @@ abstract class CastSuiteBase extends SparkFunSuite with ExpressionEvalHelper {
           val e = intercept[IllegalArgumentException] {
             cast(Literal.create(interval), dataType).eval()
           }.getMessage
-          assert(e.contains("Interval string does not match day-time format"))
+          assert(e.contains(s"Interval string does not match day-time format of " +
+            s"${IntervalUtils.supportedFormat((dataType.startField, dataType.endField))
+              .map(format => s"`$format`").mkString(", ")} " +
+            s"when cast to ${dataType.typeName}: $interval, " +
+            s"set spark.sql.legacy.fromDayTimeString.enabled to true " +

Review comment:
       Let's use `LEGACY_FROM_DAYTIME_STRING.key`.




-- 
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.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

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