Skip to content

Conversation

@alamb
Copy link
Contributor

@alamb alamb commented Jan 2, 2026

Which issue does this PR close?

Rationale for this change

Fix a regression introduced in #8996

What changes are included in this PR?

  1. Add test coverage for nullif kernel
  2. Undeprecate bitwise_unary_op_helper
  3. Document subtle differences
  4. Restore nullif kernel from Speed up unary not kernel by 50%, add BooleanBuffer::from_bitwise_unary #8996

Are these changes tested

Yes

Are there any user-facing changes?

Fix (not yet released) bug

@github-actions github-actions bot added the arrow Changes to the arrow crate label Jan 2, 2026
F: FnMut(u64) -> u64,
{
BooleanBuffer::from_bitwise_unary_op(left, offset_in_bits, len_in_bits, op).into_inner()
// reserve capacity and set length so we can get a typed view of u64 chunks
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This restores the behavior to what it was prior to #8996

t
})
.into_inner();
let buffer = bitwise_unary_op_helper(right.inner(), right.offset(), len, |b| {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This restores the behavior to what it was prior to #8996

#[test]
fn nullif_fuzz() {
let mut rng = rng();
let mut rng = StdRng::seed_from_u64(7337);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use fixed random seed so the test is reproducable

(32, 32),
(0, 0),
(32, 0),
(5, 800),
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use larger slices that are more than 2 u64s

@alamb
Copy link
Contributor Author

alamb commented Jan 5, 2026

Thank you @Dandandan and @mhilton

@alamb alamb merged commit 1ba902e into apache:main Jan 5, 2026
29 of 30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

arrow Changes to the arrow crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

wrong results for null count of nullif kernel

3 participants