[
https://issues.apache.org/jira/browse/PHOENIX-3390?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15598761#comment-15598761
]
Swapna Kasula commented on PHOENIX-3390:
----------------------------------------
The function APPROX_SUM is very similar to the existing aggregate function we
have is 'SUM(X)', to allow in the select statements.
However we pass col to the SUM(X), APPROX_SUM works the same way as :
select APPROX_SUM(col) from table;
This is how I visualize:
Example:
rowkey col1 col2
google hll1 hll2
yahoo hll3 hll4
msn hll5 hll6
select APPROX_SUM(col1) from table; //returns union of (hll1 U hll3 U hll5)
for all rows
select APPROX_SUM(col1) from table where rowkey ='google' or rowkey ='yahoo'
// this returns unions of (hll1 U hll3)
> Custom UDAF for HyperLogLogPlus
> -------------------------------
>
> Key: PHOENIX-3390
> URL: https://issues.apache.org/jira/browse/PHOENIX-3390
> Project: Phoenix
> Issue Type: New Feature
> Reporter: Swapna Kasula
> Priority: Minor
>
> With ref # PHOENIX-2069
> Custome UDAF to aggregate/union of Hyperloglog's of a column and returns a
> Hyperloglog.
> select hllUnion(col1) from table; //returns a Hyperloglog, which is the
> union of all hyperloglog's from all rows for column 'col1'
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)