Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion sdks/python/apache_beam/transforms/window.py
Original file line number Diff line number Diff line change
Expand Up @@ -306,10 +306,14 @@ class GlobalWindow(BoundedWindow):
def __new__(cls):
if cls._instance is None:
cls._instance = super(GlobalWindow, cls).__new__(cls)
super(GlobalWindow,
cls._instance).__init__(GlobalWindow._getTimestampFromProto())
return cls._instance

def __init__(self) -> None:
super().__init__(GlobalWindow._getTimestampFromProto())
# Intentionally a no-op: super().__init__ is called once in __new__
# so repeated GlobalWindow() calls do not re-initialize the singleton.
pass

def __repr__(self):
return 'GlobalWindow'
Expand Down
Loading