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

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

                Author: ASF GitHub Bot
            Created on: 12/Apr/19 08:19
            Start Date: 12/Apr/19 08:19
    Worklog Time Spent: 10m 
      Work Description: ttanay commented on pull request #8206: [BEAM-6695] 
Latest PTransform for Python SDK
URL: https://github.com/apache/beam/pull/8206#discussion_r274805119
 
 

 ##########
 File path: sdks/python/apache_beam/transforms/combiners.py
 ##########
 @@ -45,6 +45,7 @@
 from apache_beam.typehints import Union
 from apache_beam.typehints import with_input_types
 from apache_beam.typehints import with_output_types
+from apache_beam.typehints.decorators import _check_instance_type
 
 Review comment:
   There are no public functions that do the same/something similar, except for 
`with_input_types` AFAIK. 
   
   I think the problem here is that we want to check the type of the element 
which is different at pipeline construction-time and runtime.
   While creating the PCollection, the type of the elements is `WindowedValue` 
and inside the DoFn, the type of the element is `Tuple`. 
   
   If the input is an object of WindowedValue, any DoFn will have its element 
param as the value attribute of the WindowedValue.  I think the type evaluated 
at pipeline construction-time should also be the same. 
   If that is the case, then `with_input_types` will work as intended here.
 
----------------------------------------------------------------
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: 226527)
    Time Spent: 5.5h  (was: 5h 20m)

> Latest transform for Python SDK
> -------------------------------
>
>                 Key: BEAM-6695
>                 URL: https://issues.apache.org/jira/browse/BEAM-6695
>             Project: Beam
>          Issue Type: New Feature
>          Components: sdk-py-core
>            Reporter: Ahmet Altay
>            Assignee: Tanay Tummalapalli
>            Priority: Minor
>          Time Spent: 5.5h
>  Remaining Estimate: 0h
>
> Add a PTransform} and Combine.CombineFn for computing the latest element in a 
> PCollection.
> It should offer the same API as its Java counterpart: 
> https://github.com/apache/beam/blob/11a977b8b26eff2274d706541127c19dc93131a2/sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/Latest.java



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to