influxdata / flux

Flux is a lightweight scripting language for querying databases (like InfluxDB) and working with data. It's part of InfluxDB 1.7 and 2.0, but can be run independently of those.
https://influxdata.com
MIT License
767 stars 153 forks source link

Invalid time literals silently accepted #955

Open wolffcm opened 5 years ago

wolffcm commented 5 years ago

If I enter the following bogus query

import "csv"
csv.from(csv: "asdf,asdf") |> range(start: 2019-02-05T00:00:00, stop: 2019-02-06T00:00:00)

I get this error

Error: failed to create initial logical plan: cannot query an empty range

This is an error that occurs after the script is interpreted and just as query planning is starting. The issue is that the time literals in the range are lacking a "Z" at the end. The parser seems to silently accept these literals and produce the same bogus value for the start and stop parameters, and hence Flux thinks that the bounds of the range are empty.

This error is really confusing.

github-actions[bot] commented 1 week ago

This issue has had no recent activity and will be closed soon.