Skip to content

fix: Aggregate custom scan handles NULL bool values in GROUP BY#4584

Merged
rebasedming merged 1 commit into0.22.xfrom
backport-4582-to-0.22.x
Mar 30, 2026
Merged

fix: Aggregate custom scan handles NULL bool values in GROUP BY#4584
rebasedming merged 1 commit into0.22.xfrom
backport-4582-to-0.22.x

Conversation

@paradedb-bot
Copy link
Copy Markdown
Contributor

Description

Backport of #4582 to 0.22.x.

…4582)

# Ticket(s) Closed

- Closes #

## What

- `GROUP BY` on a nullable bool column with the aggregate custom scan
crashed with: `InvalidArgument("Missing value U64(2) for field ... is
not supported for column type Bool")`
- The cause was that Tantivy's terms aggregation rejects all numeric
`Key` variants for Bool columns
- Instead, use `Key::Str(NULL_SENTINEL_*)` for Bool fields, which routes
through Tantivy's `MissingTermAgg` collector

## Why

## How

## Tests

Added regression test

---------

Co-authored-by: Claude Opus 4.6 (1M context) <[email protected]>
(cherry picked from commit 99b6ddf)
@paradedb-bot paradedb-bot added the automated-cherry-pick This PR is the result of our automated cherry-pick machinery. label Mar 30, 2026
@paradedb-bot paradedb-bot requested a review from a team as a code owner March 30, 2026 23:23
@paradedb-bot paradedb-bot requested review from rebasedming and removed request for a team March 30, 2026 23:23
@rebasedming rebasedming merged commit 2cf584e into 0.22.x Mar 30, 2026
20 checks passed
@rebasedming rebasedming deleted the backport-4582-to-0.22.x branch March 30, 2026 23:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automated-cherry-pick This PR is the result of our automated cherry-pick machinery.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants