[
https://issues.apache.org/jira/browse/BEAM-12?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Frances Perry resolved BEAM-12.
-------------------------------
Resolution: Not A Problem
> Apply GroupByKey transforms on PCollection of normal type other than KV
> -----------------------------------------------------------------------
>
> Key: BEAM-12
> URL: https://issues.apache.org/jira/browse/BEAM-12
> Project: Beam
> Issue Type: Improvement
> Components: sdk-java-core
> Reporter: bakeypan
> Assignee: Frances Perry
> Priority: Trivial
>
> Now the GroupByKey transforms can only apply on PCollection<KV<K,V>>.So I
> have to transform PCollection<T> to PCollection<KV<K,V>> before I want to
> apply GroupByKey.
> I think we can do better by apply GroupByKey on normal type of PCollection
> other than KV.And user can offer one custome extract key function or we can
> offer default extract key function.Just like this:
> PCollection<T> input = ...
> PCollection<KV<K,Iterable<V>>> result = input.apply(GroupByKey.<K,
> V>create(new ExtractFn()));
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)