influxdata / influxdata/influxdb

keep should not block aggregate window optimizations

Open
#19,228 0 comments 0 reactions 0 assignees View on GitHub
team/query
Dominant language
Rust
Stars
31.7k
Forks
3.7k
Avg merge
13h 37m
Merged PRs (30d)
8

Description

Currently a query like the following:
```
from
|> range
|> filter
|> keep
|> aggregateWindow
```
will not be optimized as the call to `keep` blocks the `aggregateWindow` from being pushed down. We should have a rewrite rule similar to the group window transpose rule for pushing the `aggregateWindow` past the call to `keep`.

Contributor guide

Open the contributing guide

Research direction

Start by locating the existing group window transpose rewrite rule and the optimizer handling aggregateWindow and keep. Use the query shape in the issue to verify the new rewrite allows aggregateWindow to move past keep and that the aggregate window optimization is applied.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
databases, performance
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.