liferoad commented on code in PR #26922:
URL: https://github.com/apache/beam/pull/26922#discussion_r1224891505
##########
sdks/python/apache_beam/transforms/core.py:
##########
@@ -2581,7 +2581,7 @@ def add_input_types(transform):
if pcoll.windowing.windowfn != GlobalWindows():
Review Comment:
I think I understand what you mean now. I changed the condition using what
you suggested. But below code has this error `GroupByKey cannot be applied to
an unbounded PCollection with global windowing and a default trigger
pipeline_result = pipeline.run()`:
```
pipeline = beam.Pipeline(DataflowRunner(), options=options)
_ = (
pipeline
| beam.io.ReadFromPubSub(topic=topic)
| beam.WindowInto(
window.GlobalWindows(),
trigger=trigger.Repeatedly(trigger.AfterCount(4)),
accumulation_mode=trigger.AccumulationMode.DISCARDING,
#accumulation_mode=trigger.AccumulationMode.ACCUMULATING,
)
| "Print 1" >> beam.transforms.util.LogElements()
# | beam.combiners.Count.Globally().without_defaults()
| beam.combiners.Count.Globally()
| "Print 2" >> beam.transforms.util.LogElements()
)
```
Is it possible to use this combination (Unbounded source + GlobalWindows
with DefaultTrigger)?
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]