crunch-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gabriel Reid (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CRUNCH-501) Object reuse issue in combineValues(Aggregator)
Date Mon, 23 Feb 2015 20:27:12 GMT

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

Gabriel Reid commented on CRUNCH-501:
-------------------------------------

Yeah, indeed not super-simple -- it's surprising to hear that this is only coming up for the
first time now.

I think we can fix this by adding the value PType to AggregatorCombineFn as a constructor
parameter, and then detach the values in there before passing them in to aggregator.update.
That's all internal, so wouldn't break any backwards compatibility.



> Object reuse issue in combineValues(Aggregator)
> -----------------------------------------------
>
>                 Key: CRUNCH-501
>                 URL: https://issues.apache.org/jira/browse/CRUNCH-501
>             Project: Crunch
>          Issue Type: Bug
>            Reporter: Brandon Davis
>
> I'm trying to use combineValues on a PGroupedTable. I am using Aggregators.FIRST_N. If
I have 20 keys in my PGroupedTable, then I only get 20 distinct values because the AggregatorCombineFn
and FirstNAggregator don't detach the values from the incoming iterator.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message