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:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to