udim commented on a change in pull request #15003:
URL: https://github.com/apache/beam/pull/15003#discussion_r652292453



##########
File path: sdks/python/apache_beam/transforms/core.py
##########
@@ -2321,22 +2321,37 @@ def expand(self, pcoll):
     if not pcoll.is_bounded and isinstance(
         windowing.windowfn, GlobalWindows) and isinstance(trigger,
                                                           DefaultTrigger):
-      raise ValueError(
-          'GroupByKey cannot be applied to an unbounded ' +
-          'PCollection with global windowing and a default trigger')
-
-    if not pcoll.pipeline.allow_unsafe_triggers:
-      unsafe_reason = trigger.may_lose_data(windowing)
-      if unsafe_reason != DataLossReason.NO_POTENTIAL_LOSS:
+      if pcoll.pipeline.allow_unsafe_triggers:
+        # TODO(BEAM-9487) Change comment for Beam 2.33
+        _LOGGER.warning(
+            'PCollection passed to GroupByKey is unbounded, has a '

Review comment:
       LMK if you want to fix this or otherwise resolve this conversation and 
I'll merge the PR.




-- 
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.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to