influxdata / influxdata/influxdb-client-python
Different query result to DataExplorer
还没有人认领这个 Issue。
- 主要语言
- Python
- 星标
- 793
- 派生
- 186
- 平均合并
- 3 小时 2 分钟
- 30 天内合并 PR
- 1
描述
- Client Version: 1.37.0
- InfluxDB Version: v2.7.1
- Platform: Windows10
Query:
from(bucket:"rust")
|> range(start: 2023-07-28T04:22:00Z, stop: 2023-07-28T04:25:00Z)
|> filter(fn: (r) => r["_measurement"] == "market_snapshot")
|> filter(fn: (r) => r["ticker"] == "TEST1" or r["ticker"] == "TEST2")
|> pivot(rowKey: ["_time"], columnKey: ["_field"], valueColumn: "_value")
|> keep(columns: ["_time", "ticker", "bid", "bidq", "ask", "askq", "volume"])
|> group()
Expected Behavior:
Query results are sorted based on _time
Actual behavior:
Query results are stacked based on ticker (tag)
result table _time ticker ask askq bid bidq volume
0 _result 0 2023-07-28 04:22:00.027463+00:00 TEST1 34275.0 9693 34265.0 696 0
1 _result 0 2023-07-28 04:22:00.229166+00:00 TEST1 34270.0 246 34265.0 696 0
2 _result 0 2023-07-28 04:22:00.370787+00:00 TEST1 34270.0 246 34265.0 1007 0
3 _result 0 2023-07-28 04:22:01.023661+00:00 TEST1 34270.0 247 34265.0 1007 0
4 _result 0 2023-07-28 04:22:01.083292+00:00 TEST1 34270.0 247 34265.0 1007 20
.. ... ... ... ... ... ... ... ... ...
809 _result 0 2023-07-28 04:24:56.852404+00:00 TEST2 34320.0 10122 34300.0 4355 0
810 _result 0 2023-07-28 04:24:57.046504+00:00 TEST2 34315.0 34 34300.0 4355 0
811 _result 0 2023-07-28 04:24:59.049960+00:00 TEST2 34315.0 72 34300.0 4355 0
812 _result 0 2023-07-28 04:24:59.405875+00:00 TEST2 34315.0 34 34300.0 4355 0
813 _result 0 2023-07-28 04:24:59.882963+00:00 TEST2 34315.0 9784 34300.0 100 0
After sorting
0 _result 0 2023-07-28 04:22:00.027463+00:00 TEST1 34275.0 9693 34265.0 696 0
1 _result 0 2023-07-28 04:22:00.229166+00:00 TEST1 34270.0 246 34265.0 696 0
2 _result 0 2023-07-28 04:22:00.370787+00:00 TEST1 34270.0 246 34265.0 1007 0
552 _result 0 2023-07-28 04:22:00.378335+00:00 TEST2 34320.0 10065 34300.0 4058 0
553 _result 0 2023-07-28 04:22:00.431953+00:00 TEST2 34320.0 10065 34300.0 4058 39
.. ... ... ... ... ... ... ... ... ...
549 _result 0 2023-07-28 04:24:59.393780+00:00 TEST1 34270.0 1148 34260.0 2108 1
550 _result 0 2023-07-28 04:24:59.399117+00:00 TEST1 34270.0 1962 34260.0 1307 0
812 _result 0 2023-07-28 04:24:59.405875+00:00 TEST2 34315.0 34 34300.0 4355 0
551 _result 0 2023-07-28 04:24:59.875531+00:00 TEST1 34270.0 9126 34260.0 825 0
813 _result 0 2023-07-28 04:24:59.882963+00:00 TEST2 34315.0 9784 34300.0 100 0
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
使用提供的 bucket、时间范围、measurement 和 ticker 过滤器,重现针对 InfluxDB v2.7.1 的 Python 客户端查询。将返回的行与所示的排序输出进行比较;完成的标准是 TEST1 和 TEST2 的结果按 _time 排序,而不是按 ticker 堆叠。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- python
- 领域
- database
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 45/100