[
https://issues.apache.org/jira/browse/BEAM-6695?focusedWorklogId=242975&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-242975
]
ASF GitHub Bot logged work on BEAM-6695:
----------------------------------------
Author: ASF GitHub Bot
Created on: 15/May/19 23:37
Start Date: 15/May/19 23:37
Worklog Time Spent: 10m
Work Description: robinyqiu commented on issue #8206: [BEAM-6695] Latest
PTransform for Python SDK
URL: https://github.com/apache/beam/pull/8206#issuecomment-492860487
Hi @ttanay , I spent some time to investigate into the issues. I am sharing
my findings here and I hope it will be helpful.
1) I agree with what @aaltay said here.
> In your example, the inputs you are passing are not in type Tuple[K, V].
For example, whatever test you come up with, it should be valid to do
Create(elem_list) | GroupByKey(), and that input will work on PerKey transform.
In other words, the action item is that we should add type annotations here
```python
@with_input_types(T)
@with_output_types(T)
class Globally(ptransform.PTransform): ...
```
and here
```python
@with_input_types(KV[K, V])
@with_output_types(KV[K, V])
class PerKey(ptransform.PTransform): ...
```
This is the intended behavior for these transforms. I know that the current
tests will break after we add these annotations, but I think the right thing to
do is that we make these changes and fix the tests (how we create a PCollection
of timestamped values/kvs for testing using `Create`, to be specific).
----------------------------------------------------------------
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: 242975)
Time Spent: 9h 10m (was: 9h)
> 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: 9h 10m
> 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)