Skip to content

Commit b2fe2c7

Browse files
committed
avoid offsest validation
1 parent 4d5e716 commit b2fe2c7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

datafusion/physical-expr/src/binary_map.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,9 @@ where
494494
let num_values = offsets.len() - 1;
495495
single_null_buffer(num_values, null_index)
496496
});
497-
let offsets = OffsetBuffer::new(ScalarBuffer::from(offsets));
497+
// SAFETY: the offsets were constructed correctly in `insert_if_new` --
498+
// monotonically increasing, overflows were checked.
499+
let offsets = unsafe { OffsetBuffer::new_unchecked(ScalarBuffer::from(offsets)) };
498500
let values = buffer.finish();
499501

500502
match output_type {

0 commit comments

Comments
 (0)