influxdata / influxdata/influxdb

Data Explorer groups some points that it shoud'nt

Open
#21,187 1 comment 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

__Steps to reproduce:__
List the minimal actions needed to reproduce the behavior.
Run the following flux script:
```
import "array"

myData = array.from(rows: [
{_time: 2021-01-01T00:00:00Z, _measurement: "m", _field: "t", _value: 1, tag1:"A", tag2:"B", tag3:"C"},
{_time: 2021-01-01T01:00:00Z, _measurement: "m", _field: "t", _value: 0, tag1:"A", tag2:"B", tag3:"C"},
{_time: 2021-01-01T02:00:00Z, _measurement: "m", _field: "t", _value: 1, tag1:"C", tag2:"A", tag3:"B"},
{_time: 2021-01-01T03:00:00Z, _measurement: "m", _field: "t", _value: 0, tag1:"C", tag2:"A", tag3:"B"},
])

myData |> group(columns: ["tag1", "tag2", "tag3"]) |> yield()
```

__Expected behavior:__
Should display 2 lines with different colors like this:
![image](https://user-images.githubusercontent.com/75020085/114271955-46a25800-9a14-11eb-8085-f3d94db1a1c9.png)
Rendered using this script:
```
import "array"

myData = array.from(rows: [
{_time: 2021-01-01T00:00:00Z, _measurement: "m", _field: "t", _value: 1, tag1:"A", tag2:"B", tag3:"C"},
{_time: 2021-01-01T01:00:00Z, _measurement: "m", _field: "t", _value: 0, tag1:"A", tag2:"B", tag3:"C"},
{_time: 2021-01-01T02:00:00Z, _measurement: "m", _field: "t", _value: 1, tag1:"C", tag2:"A", tag3:"D"},
{_time: 2021-01-01T03:00:00Z, _measurement: "m", _field: "t", _value: 0, tag1:"C", tag2:"A", tag3:"D"},
])

myData |> group(columns: ["tag1", "tag2", "tag3"]) |> yield()
```

It seems that only the values of tags are taken into account and not the tags themself

__Actual behavior:__
A third line joined point 2 and 3:
![image](https://user-images.githubusercontent.com/75020085/114271884-eb706580-9a13-11eb-84c4-35f96f219dca.png)

__Environment info:__
InfluxDB version: Version 2.0.4
Other relevant environment details: docker image quay.io/influxdb/influxdb:v2.0.4

Contributor guide

Open the contributing guide

Research direction

Start by running the provided Flux script in the InfluxDB Data Explorer and compare the actual grouping with the expected two-line visualization. Trace how grouped tag data is converted into displayed series and verify the result with the reproduction case. Done means points from distinct tag groups are not joined into one line and the two groups receive distinct colors.

Written by the indexing model from the issue text.

Assessment

Domain
data-visualization
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.