Skip to content

Modify TimeRange to support relative time ranges #24

@jsternberg

Description

@jsternberg

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions