Skip to content

Pathological UI behavior with column named "table" #20821

Open
@philomory

Description

@philomory

Steps to reproduce:
List the minimal actions needed to reproduce the behavior.

  1. Issue a query that will return a column named "table", such as the following:
from(bucket: "live")
  |> range(start: v.timeRangeStart, stop: v.timeRangeStop)
  |> filter(fn: (r) => r._measurement == "cpu" and r._field == "usage_idle")
  |> set(key: "table", value: "oops")
  |> group(columns: ["host"])
  1. Switch to a Table display (or use the Raw Data mode)

Expected behavior:
The UI should group my data by host, and contain a column called "table" which contains the string "oops" for every record.

Actual behavior:
All of my data is grouped together, and there is no table column to be seen.

If you observe the query in your browser's network inspector (or just send the query to the API manually), you will see that in the API response there are two columns named table: one with an integer that increments for each table in the output stream (e.g. for each host), and one with the string value "oops". The UI does not account for two columns with the same name and treats the column containing the string value "oops" as if it denoted the table number.

Additional info:
Ideally, when parsing the annotated CSV, the browser should recognize that the special table column is a distinct sort of information from the actual data columns, and handle it separately. Alternatively, the metadata column holding the table number should be renamed _table to as to be less likely to result in name collisions.

Whether the annotated CSV uses table or _table to denote the table number, if that is not an acceptable name for a column in a Flux query, then an error should be raised explaining that when an attempt to create such a column is made.

Environment info:

  • InfluxDB version: InfluxDB Cloud 2.0 (UI displays the text Version (65a98d8))

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions