Skip to content

fix: prevent LEAD/LAG IGNORE NULLS panic without null bitmap (#23706) - #102

Open
epgif wants to merge 1 commit into
upgrade-df-ver5100-afrom
epg/fix-23705
Open

fix: prevent LEAD/LAG IGNORE NULLS panic without null bitmap (#23706)#102
epgif wants to merge 1 commit into
upgrade-df-ver5100-afrom
epg/fix-23705

Conversation

@epgif

@epgif epgif commented Aug 13, 2026

Copy link
Copy Markdown
Collaborator

Rationale for this change

Arrow arrays containing no null values commonly omit the null bitmap.
The whole-partition evaluation path for LEAD and LAG with IGNORE NULLS unconditionally unwrapped that optional bitmap, causing a panic
for valid non-null input arrays.

(cherry picked from commit a8d1af6)

for influxdata/EAR#7049

…23706)

## Which issue does this PR close?

- Closes apache#23705.

## Rationale for this change

Arrow arrays containing no null values commonly omit the null bitmap.
The whole-partition evaluation path for `LEAD` and `LAG` with `IGNORE
NULLS` unconditionally unwrapped that optional bitmap, causing a panic
for valid non-null input arrays.

## What changes are included in this PR?

- Fall back to the existing regular shift implementation when the input
has no null bitmap.
- Add a regression test covering both `LEAD` and `LAG` with an array
that explicitly has no null bitmap.

## Are these changes tested?

Yes.

## Are there any user-facing changes?

`LEAD` and `LAG` with `IGNORE NULLS` no longer panic when the input
Arrow array has no null bitmap. There are no public API changes.

(cherry picked from commit a8d1af6)
@epgif
epgif marked this pull request as ready for review August 13, 2026 15:23
@epgif
epgif requested a review from alamb August 13, 2026 15:23
@epgif

epgif commented Aug 13, 2026

Copy link
Copy Markdown
Collaborator Author

Coming up: influxdata/influxdb_iox#16691

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants