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/10/16 06:08:08 UTC

[GitHub] [spark] LinhongLiu commented on a change in pull request #26134: Calendarinterval

LinhongLiu commented on a change in pull request #26134: Calendarinterval
URL: https://github.com/apache/spark/pull/26134#discussion_r335291337
 
 

 ##########
 File path: sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/Triggers.scala
 ##########
 @@ -31,8 +31,9 @@ private object Triggers {
 
   def convert(interval: String): Long = {
     val cal = CalendarInterval.fromCaseInsensitiveString(interval)
-    if (cal.months > 0) {
-      throw new IllegalArgumentException(s"Doesn't support month or year interval: $interval")
+    if (cal.months > 0 || cal.days > 0) {
+      throw new IllegalArgumentException(
+        s"Doesn't support day, week, month or year interval: $interval")
 
 Review comment:
   This will fail a current valid usage: `Trigger.ProcessingTime("10 day")`
   Maybe we should still keep converting day interval and use a 24 hours = 1 day assumption

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