hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Zheng Shao (JIRA)" <>
Subject [jira] Commented: (HIVE-259) Add PERCENTILE aggregate function
Date Wed, 10 Feb 2010 19:16:28 GMT


Zheng Shao commented on HIVE-259:

Jerome, it seems to me that the best data structure for counting is a HashMap, which allows
near-constant-time insertion, find, and insertion. When we "terminate" we can get the entries
and sort them but that cost should be small (it's one-time cost and the number of unique items
won't be too big - users should have used "round" to shrink the number of unique numbers).

It seems currently we are paying log(n) cost for each find, and O(n) cost for each insertion.

Does that make sense?

For sharing the state object, we can just declare the state class as public static.

> Add PERCENTILE aggregate function
> ---------------------------------
>                 Key: HIVE-259
>                 URL:
>             Project: Hadoop Hive
>          Issue Type: New Feature
>          Components: Query Processor
>            Reporter: Venky Iyer
>            Assignee: Jerome Boulon
>         Attachments: HIVE-259.patch
> Compute atleast 25, 50, 75th percentiles

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message