You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by "robertwb (via GitHub)" <gi...@apache.org> on 2023/06/09 21:39:30 UTC

[GitHub] [beam] robertwb commented on a diff in pull request #26922: Fix inject_default in CombineGlobally

robertwb commented on code in PR #26922:
URL: https://github.com/apache/beam/pull/26922#discussion_r1224799988


##########
sdks/python/apache_beam/transforms/core.py:
##########
@@ -2598,8 +2598,9 @@ def typed(transform):
 
       def inject_default(_, combined):
         if combined:
-          assert len(combined) == 1
-          return combined[0]
+          if len(combined) > 1:
+            _LOGGER.warning('Apply Combined Fn with this list: %s', combined)
+            return combined[-1]

Review Comment:
   We cannot safely just "drop" extra values, giving back an arbitrary, uncombined choice.



-- 
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-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org