[ 
https://issues.apache.org/jira/browse/BEAM-7508?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16880812#comment-16880812
 ] 

Kyle Weaver commented on BEAM-7508:
-----------------------------------

> Can this be achieved in a backwards compatible way?
 
One option would be to (re-)add a KeyedCombineFn class. It looks like there 
used to be one in the past, but it was removed for some reason. It'd be helpful 
to get context for that: https://issues.apache.org/jira/browse/BEAM-2049

> Expose the current key to the CombineFn
> ---------------------------------------
>
>                 Key: BEAM-7508
>                 URL: https://issues.apache.org/jira/browse/BEAM-7508
>             Project: Beam
>          Issue Type: Improvement
>          Components: sdk-ideas, sdk-java-core
>            Reporter: Luke Cwik
>            Priority: Major
>
> One can not currently access the key during combining. Having access to the 
> key can be useful during various phases.
> There is a less then ideal workaround where the user embeds the key within 
> the value turning the combiner over *<K, V>* into a combiner over *<K, <K, 
> V>>*.
>  
> Originally asked in 
> [https://stackoverflow.com/questions/56451796/how-can-i-access-the-key-in-subclass-of-combinerfn-when-combining-a-pcollection]



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

Reply via email to