Skip to content

Commit d3d6ef4

Browse files
committed
emit-all path
1 parent f77b22b commit d3d6ef4

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

datafusion/physical-expr-common/src/binary_map.rs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -523,6 +523,19 @@ where
523523
// Copy only the surviving bytes into the fresh builder.
524524
self.buffer.append_slice(&frozen[end..]);
525525

526+
// Rebase non-inline offsets: buffer now starts at what was `end`.
527+
// Only surviving entries (offset >= end) need rebasing; emitted entries
528+
// (offset < end) are removed by drain_emitted and must not be touched.
529+
if end > 0 {
530+
for entry in self.map.iter_mut() {
531+
if entry.len.as_usize() > SHORT_VALUE_LEN
532+
&& entry.offset_or_inline >= end
533+
{
534+
entry.offset_or_inline -= end;
535+
}
536+
}
537+
}
538+
526539
let nulls = self.null.and_then(|(_, null_idx)| {
527540
if null_idx >= cursor && null_idx < cursor + n {
528541
Some(single_null_buffer(n, null_idx - cursor))

0 commit comments

Comments
 (0)