influxdata / influxdata/influxdb

Mathematics across tags

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

Description

__Proposal:__
Pretty much the same thing as https://github.com/influxdata/influxdb/issues/3552, except across tags too. For example it would be cool to be able to do something like `SELECT (disk_free_space/disk_total_space)*100 FROM disk_stats` to get the percent free space.

__Current behavior:__
You can only do mathematics across fields.

__Desired behavior:__
The ability to do mathematics across tags as well

__Alternatives considered:__
Precalculate percentage before storing in influx. For example collectd df plugin has a ValuesPercentage option that can be set to true.

__Use case:__
Basic calculations. Alerting. Advanced calculations. I'm sure there are a bunch of use cases.

Contributor guide

Open the contributing guide

Research direction

The issue names no implementation files, tests, or entry points. Start by locating the query-expression handling for field arithmetic and the existing work referenced in issue #3552; done means expressions can calculate across tags and the behavior is covered by tests for the shown disk-space example.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
database
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.