Github user maropu commented on a diff in the pull request:
https://github.com/apache/spark/pull/22414#discussion_r217898513
--- Diff:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/TimeWindow.scala
---
@@ -35,6 +35,10 @@ case class TimeWindow(
with ImplicitCastInputTypes
with Unevaluable
with NonSQLExpression {
+ require(windowDuration > 0, "The window duration must be " +
+ s"a positive integer, long or string literal, found: $windowDuration")
+ require(slideDuration > 0, "The slide duration must be " +
+ s"a positive integer, long or string literal, found: $slideDuration")
--- End diff --
We cannot check these requirements only in the constructor?
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]