influxdata / influxdata/influxdb
Reorder window() and group() over InfluxDB source
- Dominant language
- Rust
- Stars
- 31.7k
- Forks
- 3.7k
- Avg merge
- 13h 37m
- Merged PRs (30d)
- 8
Description
We should write a planner rule that will transform this
```
(...successors...)
group
window
ReadFilter
```
to this
```
(...successors...)
window
group
ReadFilter
```
This will ensure that:
- for influxdb sources, the `group` will be closer to the source, and will be more likely to be pushed down
- As a result of this, rules that need to match against `ReadGroup` nodes (such as ruled that need to match `ReadGroup |> window |> aggregate`) will be more likely to match, leading to better plans.
Note: this rule doesn't seem to belong in Flux since we can't say that `group` should happen before `window` in all cases. In particular `group` will cause rows to no longer be order by `_time`, which could make `window` less efficient.
DOD:
- Rule exists
- Test cases with 100% coverage exist
Contributor guide
Research direction
No files, entry points, or test paths are named. Locate the planner rules that handle group, window, ReadFilter, and ReadGroup, then inspect existing rule tests before implementing the stated transformation. Done means the rule exists and its test cases provide 100% coverage.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- databases
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100