flux icon indicating copy to clipboard operation
flux copied to clipboard

Reimplement old planner rules in new planner

Open wolffcm opened this issue 7 years ago • 1 comments

This commit shows the old rules: https://github.com/influxdata/flux/commit/4cce9948886e1d8d1b8e25aa5add2821fa266998

Rules that need re-implementing are:

  • filter rules (push through group, limit, merge with another filter)
  • first (and other selector) push down rules
  • keys point limit rule
  • limit push down rules (what can you push a limit through?)
  • range push down rules

We should come up with a canonical way of ordering operations that models how storage performs those operations. It seems like this should be:

  1. Range
  2. Filter
  3. Grouping
  4. Limit (point, series)
  5. Window
  6. Aggregate

In other words, we should write rules that produce plans with operations in this order if that's possible to do in a way that preserves semantics.

For push down rules, there should be one rule for each type of node that can be pushed through. E.g., filters may be pushed through a group node or a limit node, so there should be both a PushFilterThroughGroupRule and a PushFilterThroughLimitRule.

Push down rules should live in the file for the node being pushed through. So PushFilterThroughLimitRule should live in transformations/limit.go.

wolffcm avatar Nov 12 '18 19:11 wolffcm

We should do this, but there is no reason we can't release an update after we GA with these improvement.

rickspencer3 avatar Mar 31 '20 13:03 rickspencer3