influxdata / influxdata/influxdb

Functions for timestamps

Open
#5,369 6 comments 0 reactions 0 assignees View on GitHub
1.x area/queries flux/triaged
Dominant language
Rust
Stars
31.7k
Forks
3.7k
Avg merge
13h 37m
Merged PRs (30d)
8

Description

Currently, when doing aggregations, timestamp of the resulting value is the first timestamp of the bucket.

But when datapoints are not made at regular intervals, then this does not provide necessary the best output, for example, when you want to visualize aggregated datapoints and you want a representative of a bucket. I would suggest that there is a way to specify a function when aggregating on how you want to aggregate the timestamps as well:
- first: the first timestamp of all datapoints in the bucket
- mean: the average of all timestamps in the bucket
- last: the last timestamp of all datapoints in the bucket

Contributor guide

Open the contributing guide

Research direction

No files, tests, or entry points are named. Start by locating the aggregation implementation and its timestamp handling, then review existing aggregation tests before deciding how the first, mean, and last timestamp options should be exposed and verified.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
data, 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.