You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@beam.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2021/10/06 22:00:00 UTC

[jira] [Work logged] (BEAM-9487) GBKs on unbounded pcolls with global windows and no triggers should fail

     [ https://issues.apache.org/jira/browse/BEAM-9487?focusedWorklogId=661217&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-661217 ]

ASF GitHub Bot logged work on BEAM-9487:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 06/Oct/21 21:59
            Start Date: 06/Oct/21 21:59
    Worklog Time Spent: 10m 
      Work Description: kennknowles commented on a change in pull request #15603:
URL: https://github.com/apache/beam/pull/15603#discussion_r723705851



##########
File path: sdks/python/apache_beam/transforms/ptransform_test.py
##########
@@ -505,12 +504,10 @@ def test_group_by_key_allow_unsafe_triggers(self):
           | beam.Create([(1, 1), (1, 2), (1, 3), (1, 4)])
           | WindowInto(
               window.GlobalWindows(),
-              trigger=trigger.AfterCount(5),
+              trigger=trigger.AfterCount(4),
               accumulation_mode=trigger.AccumulationMode.ACCUMULATING)
           | beam.GroupByKey())
-      # We need five, but it only has four - Displays how this option is
-      # dangerous.
-      assert_that(pcoll, is_empty())
+      assert_that(pcoll, equal_to([(1, [1, 2, 3, 4])]))

Review comment:
       You ought to be able to get output from `AfterCount(5)`, right?




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


Issue Time Tracking
-------------------

    Worklog Id:     (was: 661217)
    Time Spent: 34h  (was: 33h 50m)

> GBKs on unbounded pcolls with global windows and no triggers should fail
> ------------------------------------------------------------------------
>
>                 Key: BEAM-9487
>                 URL: https://issues.apache.org/jira/browse/BEAM-9487
>             Project: Beam
>          Issue Type: Bug
>          Components: sdk-py-core
>            Reporter: Udi Meiri
>            Assignee: Zachary Houfek
>            Priority: P0
>              Labels: EaseOfUse, starter
>             Fix For: 2.34.0
>
>          Time Spent: 34h
>  Remaining Estimate: 0h
>
> This, according to "4.2.2.1 GroupByKey and unbounded PCollections" in https://beam.apache.org/documentation/programming-guide/.
> bq. If you do apply GroupByKey or CoGroupByKey to a group of unbounded PCollections without setting either a non-global windowing strategy, a trigger strategy, or both for each collection, Beam generates an IllegalStateException error at pipeline construction time.
> Example where this doesn't happen in Python SDK: https://stackoverflow.com/questions/60623246/merge-pcollection-with-apache-beam
> I also believe that this unit test should fail, since test_stream is unbounded, uses global window, and has no triggers.
> {code}
>   def test_global_window_gbk_fail(self):
>     with TestPipeline() as p:
>       test_stream = TestStream()
>       _ = p | test_stream | GroupByKey()
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)