xinrong-meng commented on code in PR #37367:
URL: https://github.com/apache/spark/pull/37367#discussion_r947085356
##########
python/pyspark/pandas/window.py:
##########
@@ -144,10 +144,15 @@ def __init__(
window: int,
min_periods: Optional[int] = None,
):
+ if type(window) is not int:
+ raise ValueError("window must be an integer")
if window < 0:
raise ValueError("window must be >= 0")
- if (min_periods is not None) and (min_periods < 0):
- raise ValueError("min_periods must be >= 0")
+ if min_periods is not None:
+ if type(min_periods) is not int:
Review Comment:
nit: `isinstance`?
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]