influxdata / influxdata/influxdb

[2.0] sort function doesn't work when re-assignment to _time

Open
#23,339 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
31.7k
Forks
3.7k
Avg merge
13h 37m
Merged PRs (30d)
8

Description

Running InfluxDB 2.0

This is my code of save data to influxDB
image

Running flux query
from(bucket: "test-idm-bucket") |> range(start: v.timeRangeStart, stop: v.timeRangeStop) |> filter(fn: (r) => r["equipmentNo"] == "3fb38f9c-be57-43bd-bf1b-ede34df20d22") |> filter(fn: (r) => r["_field"] == "ljll") |> sort(columns: ["_time"], desc: true)
Return result
image

I find it that sort function doesn't work. Is it caused by my re-assignment to _time?

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

Start by reproducing the provided Flux query against InfluxDB 2.0, including the reassignment to _time, and compare the returned ordering with sort(columns: ["_time"], desc: true). No source file or test is named; determine whether the behavior is caused by the reassignment, then identify the relevant implementation or test and confirm the corrected ordering.

Written by the indexing model from the issue text.

Assessment

Domain
databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 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.