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

Matthew Hayes commented on DATAFU-117:
--------------------------------------

Oh something else I thought about that would be useful is to compare the 
performance of this UDF to simply using DISTINCT.  What I usually do is compare 
total_mappers * avg_map_time + total_reducers * avg_reduce_time.  It would be 
good to use this information to document when this will perform better than 
DISTINCT.

> New UDF - CountDistinctUpTo
> ---------------------------
>
>                 Key: DATAFU-117
>                 URL: https://issues.apache.org/jira/browse/DATAFU-117
>             Project: DataFu
>          Issue Type: New Feature
>            Reporter: Eyal Allweil
>         Attachments: DATAFU-117.patch
>
>
> A UDF that counts distinct tuples within a bag, but only up to a preset 
> limit. If the bag contains more distinct tuples than the limit, the UDF 
> returns the limit. 
> This UDF can run reasonably well even on large bags if the limit chosen is 
> small enough though the count is done in memory.
> We use this UDF in PayPal for filtering, when we don't need to use the actual 
> tuples afterward.



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

Reply via email to