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

Modify TimeRange to support relative time ranges #24

Open
jsternberg opened this issue Jul 9, 2018 · 0 comments
Open

Modify TimeRange to support relative time ranges #24

jsternberg opened this issue Jul 9, 2018 · 0 comments

Comments

@jsternberg
Copy link
Contributor

Modify TimeRange to support relative time ranges. This is primarily to allow the influxql to flux transpiler to read an influxql expression and generate relative time ranges instead of always generating an absolute time range. It then means the transpiler doesn't need to know what the current time is.

One caveat that flux doesn't have to deal with, but we likely do, is that it is unclear what the following query should do:

WHERE time >= '2018-07-09T09:00:00Z' AND time >= now() - 1h

If we do not evaluate the now() - 1h, we can't know which one of these is the correct time range. It would be possible for us to include all of the constraints in the TimeRange struct and evaluate them when we know what now() is, but it probably wouldn't get us any closer to our ultimate goal of generating a range() operation with the appropriate arguments. But, the above is perfectly valid influxql even if it is a bit nonsensical.

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