Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

influxql: invalid duration literals parsed successfully and treated as 0s #8181

Closed
mark-rushakoff opened this issue Mar 21, 2017 · 0 comments

Comments

@mark-rushakoff
Copy link
Contributor

With the NOAA data:

> select * from h2o_feet where time > now() - 10000d limit 3
name: h2o_feet
time                level description    location     water_level
----                -----------------    --------     -----------
1439856000000000000 between 6 and 9 feet coyote_creek 8.12
1439856000000000000 below 3 feet         santa_monica 2.064
1439856360000000000 between 6 and 9 feet coyote_creek 8.005

> select * from h2o_feet where time > now() - 10000w limit 3
name: h2o_feet
time                level description    location     water_level
----                -----------------    --------     -----------
1439856000000000000 between 6 and 9 feet coyote_creek 8.12
1439856000000000000 below 3 feet         santa_monica 2.064
1439856360000000000 between 6 and 9 feet coyote_creek 8.005

> select * from h2o_feet where time > now() - 10000y limit 3
> select * from h2o_feet where time > now() - 10000asdf limit 3
> select * from h2o_feet where time > now() - asdf limit 3
ERR: invalid operation: time and *influxql.BinaryExpr are not compatible

The y suffix is something that people are likely to try, even though it's not a supported unit.

Both the y and asdf (and any other suffix that isn't a valid unit) show up in the query log as parsed as 0s.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant