pabloem commented on pull request #14869:
URL: https://github.com/apache/beam/pull/14869#issuecomment-871784677
I see what the confusion was... In this case, our args/kwargs are not side
input PCollections. They're just values.
If we wanted to support side inputs, then it would be something like this:
```py
def test_sideinputs(self):
with TestPipeline() as p:
pc = p | beam.Create([0, 2, 3])
si = AsList(p | beam.Create([1, 2, 3]))
with_keys = pc | util.WithKeys(lambda x, the_list: x + sum(the_list),
si)
assert_that(with_keys, equal_to([(6), (8), (9)]))
```
This example would not work, right?
Since we're just supporting values, then it's simpler - but I wonder if we
should also try to support side inputs? I suppose you'd rather move this change
forward, and consider side inputs later?
--
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]