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

querying with a time range that exceeds max int64 nanosecond timestamp gives no error #3369

Closed
beckettsean opened this issue Jul 17, 2015 · 5 comments

Comments

@beckettsean
Copy link
Contributor

I was querying at the edges of the valid time range to get back the most future possible point.

If I supply a time range that exceeds the max int64 nanosecond time range, there are no results returned, rather than an informative error (notice 104376 weeks vs 104375 in the valid query).

> select * from timestamps where time > now() and time < now() + 104376w
name: timestamps
----------------
time    value

> select * from timestamps where time > now() and time < now() + 104375w
name: timestamps
----------------
time                value
2015-07-17T19:56:04Z        1
2018-09-17T05:26:04Z        1
2050-05-26T07:12:44Z        1
2255-12-10T04:13:56.854775808Z  1
@sbile
Copy link

sbile commented May 24, 2016

hi,

by running the following test queries against version 0.13.0 it seems that the maximum acceptable timestamp (defined as time string) is '2050-01-01T00:00:00Z'

This works
> SELECT * FROM foo WHERE time < '2050-01-01T00:00:00Z';

The following fail with time X overflows time literal (foo measurement doesn't event have to be there)

SELECT * FROM foo WHERE time < '2050-01-01T00:00:01Z';
SELECT * FROM foo WHERE time < '2051-01-01T00:00:01Z';
SELECT * FROM foo WHERE time < '2052-01-01T00:00:01Z';

We are running influxdb server inside a docker container based on a 64bit linux machine.

Any help / clarification would be appreciated.

@jsternberg
Copy link
Contributor

jsternberg commented May 24, 2016

@sbile at the moment, 2050-01-01T00:00:00Z is the maximum time string. I think this may be changed for 1.0, but 0.13 will have that limit and I'm not certain if the time limit is changing for 1.0 or not.

In the future, please ask question to the mailing list as you will get a much better answer there. Thanks.

@beckettsean
Copy link
Contributor Author

@rkuchan we should update the max time range in the docs to reflect the 2050 limitation.

@beckettsean
Copy link
Contributor Author

@sbile if you use epoch timestamps rather than rfc3339 datetimestamps you can parse dates well into 2250. Track #6740 for progress on fixing the discrepancy.

@beckettsean
Copy link
Contributor Author

errors now display properly (modulo the rfc3339 issue):

> select * from times where time <= 9023372036854775900
name: times
-----------
time            value
936854775806        1
9372036854775806    1
9023372036854775806 1
9023372036854775807 1

> select * from times where time <= 9999999999999999999
ERR: error parsing query: unable to parse integer at line 1, char 35

> select * from times where time < now() + 104325w
ERR: time 2262-03-03T01:31:04Z overflows time literal

> select * from times where time < now() - 10000w
ERR: time 1824-10-02T00:15:38Z underflows time literal

> select * from times where time > -90233720399999999999
ERR: error parsing query: unable to parse integer at line 1, char 34

The integer errors could be more clear, but at least there's an error, not just an empty return.

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

No branches or pull requests

3 participants