You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2020/12/14 13:27:40 UTC
[GitHub] [beam] kamilwu commented on pull request #13355: [BEAM-11272] Fix combiner label constructor arg
kamilwu commented on pull request #13355:
URL: https://github.com/apache/beam/pull/13355#issuecomment-744439272
Thank you @rgruener
The recommended way to set up a custom label for a PTransform is using this syntax: `pipeline | 'my custom label' >> MyTransform()`. I'm not sure why some combiners (`ToList`, `ToSet` and `ToDict`) define their own constructor with `label` parameter, but it's probably legacy code. I think you can safely remove these constructors.
Don't worry about default labels - they are inferred from the class name:
https://github.com/apache/beam/blob/fc42781108a05c7b8a16a73310bc23674d7e3175/sdks/python/apache_beam/transforms/ptransform.py#L363-L365
----------------------------------------------------------------
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:
users@infra.apache.org