influxdata / influxdata/influxdb

Spike: Design how to push down multiple aggregates to read window and read group calls

Open
#18,862 0 comments 0 reactions 0 assignees View on GitHub
team/query
Dominant language
Rust
Stars
31.7k
Forks
3.7k
Avg merge
13h 37m
Merged PRs (30d)
8

Description

The `ReadWindowAggregate` and `ReadGroup` calls will need to support pushing down multiple aggregates for the same series and returning a value for each of them.

For `ReadWindowAggregate`, it needs to be possible to return all of the aggregates for a window before continuing to the next window. So if `count` and `sum` are pushed down at the same time, the count and sum will have the values for the first window returned before moving to the second window.

This issue involves researching the current way we stream results using grpc and how we might either add or modify that behavior to accommodate multiple aggregates.

An additional complication is that the returned aggregates can have different types while the current streaming returns only timestamps and a single typed frame rather than a frame with multiple types.

This issue is a spike on attempting to do this as part of initial research for a working group. If a workable solution is created from this, it can be converted into an issue and done or the results of this will be split off into a working group.

DOD:
- Understand the potential complexities of returning the values for multiple aggregates
- Understand how our current streaming works and identify if it can be extended to support multiple aggregates

Contributor guide

Open the contributing guide

Research direction

Start by tracing the ReadWindowAggregate and ReadGroup entry points and the current gRPC result-streaming path. Document how multiple aggregates per series or window and mixed aggregate types could be represented, and record whether the existing stream can be extended; done means the complexities and a workable direction are captured for the working group.

Written by the indexing model from the issue text.

Assessment

Tech stack
grpc
Domain
api, databases
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.