graphprotocol / graphprotocol/graph-node

[Feature] Allow aggregating over multiple time series

Open
#5,310 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

area/aggregations enhancement Stale
Dominant language
Rust
Stars
3.2k
Forks
1.1k
Avg merge
4d 1h
Merged PRs (30d)
1

Description

Description

Aggregations right now can only be done over a single timeseries. It would be good to allow aggreagations from multiple timeseries. This won't be a problem as long as each aggregate only uses data from one timeseries, but could be more difficult if you can mix multiple sources in the same aggregate, e.g. @aggregate(fn: "sum" arg: "Source1.priceUSD * Source2.amount"), as that will require aligning the two timeseries, i.e., answering the question 'which entry in Source2 corresponds to this entry in Source1')

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names no files, tests, or entry points; start by tracing how the current single-timeseries @aggregate operation is implemented. Define the behavior for independent sources and for expressions combining Source1 and Source2, including how corresponding entries are aligned, then verify that aggregation works across multiple timeseries.

Written by the indexing model from the issue text.

Assessment

Tech stack
graphql, rust
Domain
backend-api-design
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.