shunping commented on code in PR #34721: URL: https://github.com/apache/beam/pull/34721#discussion_r2064822551
########## sdks/python/apache_beam/transforms/periodicsequence.py: ########## @@ -178,25 +178,35 @@ def __init__( start_timestamp=Timestamp.now(), stop_timestamp=MAX_TIMESTAMP, fire_interval=360.0, - apply_windowing=False): + apply_windowing=False, + is_bounded=None): ''' :param start_timestamp: Timestamp for first element. :param stop_timestamp: Timestamp after which no elements will be output. :param fire_interval: Interval in seconds at which to output elements. :param apply_windowing: Whether each element should be assigned to individual window. If false, all elements will reside in global window. + :param is_bounded: whether to treat the output PCollection as bounded. + Defaults to True for small timestamp ranges and False for large ones. ''' self.start_ts = start_timestamp self.stop_ts = stop_timestamp self.interval = fire_interval self.apply_windowing = apply_windowing + self.is_bounded = ( + stop_timestamp - start_timestamp > 60 Review Comment: From the code comment above, I think it should be "< 60" since it is considered as bounded for a small time range. ########## sdks/python/apache_beam/transforms/periodicsequence.py: ########## @@ -178,25 +178,35 @@ def __init__( start_timestamp=Timestamp.now(), stop_timestamp=MAX_TIMESTAMP, fire_interval=360.0, - apply_windowing=False): + apply_windowing=False, + is_bounded=None): ''' :param start_timestamp: Timestamp for first element. :param stop_timestamp: Timestamp after which no elements will be output. :param fire_interval: Interval in seconds at which to output elements. :param apply_windowing: Whether each element should be assigned to individual window. If false, all elements will reside in global window. + :param is_bounded: whether to treat the output PCollection as bounded. + Defaults to True for small timestamp ranges and False for large ones. ''' self.start_ts = start_timestamp self.stop_ts = stop_timestamp self.interval = fire_interval self.apply_windowing = apply_windowing + self.is_bounded = ( + stop_timestamp - start_timestamp > 60 + if is_bonded is None else is_bounded) Review Comment: is_bonded -> is_bounded -- 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: github-unsubscr...@beam.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org