influxdata / influxdata/influxdb

Push down raw values to storage in filter

Open
#18,097 1 comment 0 reactions 0 assignees View on GitHub
area/performance kind/bug team/query
Dominant language
Rust
Stars
31.7k
Forks
3.7k
Avg merge
13h 37m
Merged PRs (30d)
8

Description

The following filter won't be pushed down to storage.

```
filter(fn: (r) => r["_value"])
```

In general, this isn't a valid query that returns a boolean because `_value` is usually not a boolean. But, when `_value` is a boolean, this filter is valid and should be pushed down just like:

```
filter(fn: (r) => r["_value"] == true)
```

Because of the difference in the planner, these queries perform at vastly different speeds. We should address this difference. The planner should be able to push down the first one and storage can reject the filter if `_value` is not a boolean value.

Contributor guide

Open the contributing guide

Research direction

No file or test entry point is named. Start by tracing how the planner handles a filter on raw _value and how storage receives pushed-down filters. Verify that boolean _value filters using the direct expression behave like comparisons with true, while non-boolean values can still be rejected by storage.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.