influxdata / influxdata/influxdb

Cannot query or delete data using api.

Open
#24,321 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

Cannot query or delete data using sql. The sql statement configured in the path parameter can not query data, specifically can not concatenate two query conditions with "or". Using one of these criteria alone can query the data.

The sql is:
SELECT * FROM account where (accountId = 'A-00000003' and time ='2019-03-10T20:00:00Z') or (accountId = 'A-00000002' and time ='2020-12-08T21:00:00Z')

The curl is:
curl --location 'http://localhost:8086/query?db=dbName&q=SELECT%20*%20FROM%20account%20where%20(accountId%20%3D%20%27A-00000003%27%20and%20time%20%3D%272019-03-10T20%3A00%3A00Z%27)%20or%20(accountId%20%3D%20%27A-00000002%27%20and%20time%20%3D%272020-12-08T21%3A00%3A00Z%27)' \
--header 'Authorization: Token testToken'

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the reported query through the `/query` API with the supplied SQL and curl request, then compare it with each condition used separately. Trace the query handling and SQL evaluation path to identify why the two conditions joined with `or` fail. Done means the combined query works through the API, with coverage for the reported case and the corresponding delete behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
sql
Domain
api, 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.