apache / apache/druid

Incorrect null handling for long columns in predicate matching filters

Open
#9,255 1 comment 0 reactions 0 assignees View on GitHub
Area - Null Handling Bug
Dominant language
Java
Stars
14.1k
Forks
3.8k
Avg merge
2d 58m
Merged PRs (30d)
233

Description

When SQL-compatible null handling is enabled, filters that internally use `Filters.makeValueMatcher` with a predicate factory do not handle null values from long columns correctly.

Instead of applying the predicates to `null`, the predicates are applied to a value of 0 instead.

The following filter types are affected:
- Bound
- In
- Javascript
- Regex
- SearchQuery
- Like
- Spatial

This will be fixed by https://github.com/apache/druid/pull/9251.

Contributor guide

Open the contributing guide

Research direction

Start by reviewing PR 9251, which the issue identifies as the fix, and compare it with the listed Bound, In, Javascript, Regex, SearchQuery, Like, and Spatial filters. Done means predicate factories receive null rather than 0 for null values from long columns when SQL-compatible null handling is enabled.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
databases
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.