Github user huaxingao commented on a diff in the pull request: https://github.com/apache/spark/pull/20400#discussion_r165229664 --- Diff: python/pyspark/sql/window.py --- @@ -124,16 +126,20 @@ def rangeBetween(start, end): values directly. :param start: boundary start, inclusive. - The frame is unbounded if this is ``Window.unboundedPreceding``, or + The frame is unbounded if this is ``Window.unboundedPreceding``, + ``org.apache.spark.sql.catalyst.expressions.UnboundedPreceding``, or any value less than or equal to max(-sys.maxsize, -9223372036854775808). :param end: boundary end, inclusive. - The frame is unbounded if this is ``Window.unboundedFollowing``, or + The frame is unbounded if this is ``Window.unboundedFollowing``, + ``org.apache.spark.sql.catalyst.expressions.UnboundedFollowing``, or any value greater than or equal to min(sys.maxsize, 9223372036854775807). + any value greater than or equal to 9223372036854775807. """ - if start <= Window._PRECEDING_THRESHOLD: - start = Window.unboundedPreceding - if end >= Window._FOLLOWING_THRESHOLD: - end = Window.unboundedFollowing + if isinstance(start, (int, long)) and isinstance(end, (int, long)): + if start <= Window._PRECEDING_THRESHOLD: + start = Window.unboundedPreceding + if end >= Window._FOLLOWING_THRESHOLD: + end = Window.unboundedFollowing --- End diff -- will change. Thanks!
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org