influxdata / influxdata/influxdb

error "fill(none) must be used with a function" not reported with CSV encoding

Open
#21,113 1 comment 0 reactions 0 assignees View on GitHub
1.x area/influxql area/queries
Dominant language
Rust
Stars
31.7k
Forks
3.7k
Avg merge
13h 37m
Merged PRs (30d)
8

Description

Using InfluxDB 1.8.3:

Usually, when executing a query with and without "Accept: application/csv" header, the same error is returned, ex:

query: `curl -i -X POST 'http://localhost:8086/query?db=test' --data-urlencode 'q=SELECT * FROM test FILL(foo)'` responds:
```
HTTP/1.1 400 Bad Request

{"error":"error parsing query: expected number argument in fill()"}
```

query: `curl -i -X POST 'http://localhost:8086/query?db=test' --data-urlencode 'q=SELECT * FROM test FILL(foo)' --header 'Accept: application/csv'` responds equivalently:
```
HTTP/1.1 400 Bad Request

error
error parsing query: expected number argument in fill()
```

With the following particular error though, this seems to not be the case:

query: `curl -i -X POST 'http://localhost:8086/query?db=test' --data-urlencode 'q=SELECT * FROM test FILL(none)'` responds:
```
HTTP/1.1 400 Bad Request

{"results":[{"statement_id":0,"error":"fill(none) must be used with a function"}]}
```

query: `curl -i -X POST 'http://localhost:8086/query?db=test' --data-urlencode 'q=SELECT * FROM test FILL(none)' --header 'Accept: application/csv'` however reponds:
```
HTTP/1.1 200 OK

```
i.e., simply an empty result set without an error. I presume this is a bug?

Contributor guide

Open the contributing guide

Research direction

Reproduce the two curl requests against InfluxDB 1.8.3, comparing the default response with the response using the Accept: application/csv header. Trace the query endpoint's handling of the fill(none) error in each response mode. Done means both requests return HTTP 400 and report the same error.

Written by the indexing model from the issue text.

Assessment

Domain
api, databases
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.