Skip to content

Commit 33f6921

Browse files
fix: adapt array_has array-needle fast path to arrow 58.3
BooleanBuffer::has_true() was added in arrow 59; branch-54 is on arrow 58.3, so the element-null per-row reduction uses count_set_bits() > 0 instead. No behavior change (17 array_has unit tests pass, clippy clean). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 4d76a75 commit 33f6921

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

datafusion/functions-nested/src/array_has.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -505,7 +505,8 @@ where
505505
}
506506
let start = offsets[i] - first_offset - elem_start;
507507
let end = offsets[i + 1] - first_offset - elem_start;
508-
result.append(matched.slice(start, end - start).has_true());
508+
// `BooleanBuffer::has_true()` is arrow >= 59 only; use count_set_bits.
509+
result.append(matched.slice(start, end - start).count_set_bits() > 0);
509510
}
510511
}
511512
result.finish()

0 commit comments

Comments
 (0)