Josh Clum
09/19/2022, 8:42 PMMayank
Luis Fernandez
09/20/2022, 2:32 PMaggregateMetrics:true
(?)Johan Adami
09/20/2022, 2:39 PMLuis Fernandez
09/20/2022, 2:40 PMLuis Fernandez
09/20/2022, 2:41 PMJohan Adami
09/20/2022, 2:45 PMsum(count_column)
. but there have been talks to get the broker to magically issue a sum
on a pre-aggregated count
column. count
is actually a bit confusing as it’s one of the functions where further aggregating is not the same function as count
itself. min/max/sum, you can keep min/maxing/summing results. but with count
, once you’ve counted N things, then M things, the resulting count of those is N + M, not 2 (which is what you’ll get if you call count(*)
with pre-aggregation)Luis Fernandez
09/20/2022, 2:50 PMaggregateMetrics:true
but in the records that we consume we have like count and we always send one, but since it’s for the same primary keys pinot keeps on aggregating, but with this new feature you wouldn’t need to add that count record on the producing topic all the time cause you can do it in pinot itself with this. But yea you will have to issue the sum when querying for it. as you said depending on the granularity that you are looking at to i suppose, like in the example it’s daily sales so if you are issuing a query then i suppose that the final representation of the table would be -> day ts, total sales per day, sales count per dayJohan Adami
09/20/2022, 2:59 PM1
on every row then sum it across all rows with the same non-metric fields. in your example, you would need 2 ingestion aggregation configs: one for count and one for sum_sales