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

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

                Author: ASF GitHub Bot
            Created on: 14/Dec/20 13:27
            Start Date: 14/Dec/20 13:27
    Worklog Time Spent: 10m 
      Work Description: 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:
[email protected]


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

    Worklog Id:     (was: 523858)
    Time Spent: 1.5h  (was: 1h 20m)

> Combiner Label Constructor Arg Not Passed Through To pTransform
> ---------------------------------------------------------------
>
>                 Key: BEAM-11272
>                 URL: https://issues.apache.org/jira/browse/BEAM-11272
>             Project: Beam
>          Issue Type: Bug
>          Components: sdk-py-core
>            Reporter: Robbie Gruener
>            Priority: P3
>          Time Spent: 1.5h
>  Remaining Estimate: 0h
>
> The combiners ToSet, ToDict, and ToList have a label argument in their 
> constructor:
> [https://github.com/apache/beam/blob/master/sdks/python/apache_beam/transforms/combiners.py#L877]
>  
> However the label passed through to the parent class is not actually used 
> (there is a mismatch in the super constructor) 
> https://github.com/apache/beam/blob/7ac82a875462f2c2570a1157b782ebadddebbe70/sdks/python/apache_beam/transforms/combiners.py#L68



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

Reply via email to