flux
flux copied to clipboard
Push Down aggregates when Grouping
From ifql created by nathanielc : influxdata/ifql#168
Currently the IFQL planner only pushes down aggregates if there is no grouping specified. This is because the aggregates are always performed on a per series basis. In order to push down the aggregates we need to teach the storage block type to be able to aggregate the aggregates. And we need to teach the planner when this is possible.
We need a test for this. But it should wait until we have the "new" planner.
https://github.com/influxdata/influxdb/blob/master/storage/reads/group_resultset.go#L298