influxdb/influxdb_influxql_parser
Stuart Carnie 57f55e14c8
feat: IOx InfluxQL planner learns how to process time range expressions (#6772)
* feat: IOx learns InfluxQL time-range expression → DF logical Expr

IOx now understand the how to evaluate an InfluxQL time-range filter
expression and transform that to a DataFusion logical expression.

* chore: move time range expression to independent functions

There is no need for these to be part of the `InfluxQLToLogicalPlan`
struct and makes them easier to test.

* chore: support scalar now on either side of binary expression

* chore: improve error messages

* chore: address clippy concerns

* chore: add tests for time ranges

* chore: add a test where time appears on the right-hand side

Ensure time is correctly identified on the right-hand side of a
conditional expression.

* chore: add tests that specify a timezone

* chore: Run cargo hakari tasks

* chore: fix linting issues

* chore: Remove unnecessary line

* chore: Feedback: Add API to parse a conditional expression

Based on feedback from @alamb, we don't want to hide the error from
parsing a `ConditionalExpression`. To do this, we use the
public API, `parse_statements` as a model and provide a new API,
`parse_conditional_expression`, which returns a `Result` with the error
being a `ParseError`. Additionally, `ConditionalExpression` implements
the `FromStr` API using the `parse_conditional_expression` API.

* chore: PR feedback reverting this change

I believe my intention was to update all instances in the match, but
never completed the change. Will leave for another day.

* chore: PR feedback add additional comments

* chore: rustfmt

---------

Co-authored-by: CircleCI[bot] <circleci@influxdata.com>
2023-02-01 00:27:17 +00:00
..
src feat: IOx InfluxQL planner learns how to process time range expressions (#6772) 2023-02-01 00:27:17 +00:00
Cargo.toml feat: IOx InfluxQL planner learns how to process time range expressions (#6772) 2023-02-01 00:27:17 +00:00