You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
I have several dailytopn_agg() values in materialized view and I want to aggregate them to get topn_agg() values for a week, for example
Describe the solution you'd like
Add rollup function for topn_agg() and freq_agg() the same way as it works for other aggregates
CREATE MATERIALIZED VIEW hourly ASSELECT timebucket('1hour', dt) as hour, TOPN_AGG(100, field) as field_topn FROM raw_table GROUP BY1;
SELECT topn(10, rollup(field_topn)) FROM hourly WHERE hour BETWEEN 'A'and'B'
Describe alternatives you've considered
It it possible to get all the topn_agg() results to the app and aggregate in business logic, but it requires downloading of 6MB hourly data to get a monthly value
Additional context
There is already space_saving_aggregate_combine rust function, which does exactly what I need, but it is not exposed
The text was updated successfully, but these errors were encountered:
696: Add rollup functionality to frequency aggregates r=WireBaron a=WireBaron
This change implements adds in rollup functions for frequency aggregates.
Note that while the rollup of a set of frequency aggregates will not necessarily be identical to computing a single aggregate over the underlying data (may not have the exact same upper and lower bounds on frequency), the rollup maintains the same invariants and will be able to identify most common elements as long as the frequency is different enough.
Fixes#685
Co-authored-by: Brian Rowe <brian@timescale.com>
Is your feature request related to a problem? Please describe.
I have several daily
topn_agg()
values in materialized view and I want to aggregate them to gettopn_agg()
values for a week, for exampleDescribe the solution you'd like
Add rollup function for
topn_agg()
andfreq_agg()
the same way as it works for other aggregatesDescribe alternatives you've considered
It it possible to get all the
topn_agg()
results to the app and aggregate in business logic, but it requires downloading of 6MB hourly data to get a monthly valueAdditional context
There is already
space_saving_aggregate_combine
rust function, which does exactly what I need, but it is not exposedThe text was updated successfully, but these errors were encountered: