Skip to content

Commit

Permalink
merge main
Browse files Browse the repository at this point in the history
  • Loading branch information
daBlesr committed Nov 14, 2024
1 parent 31fe845 commit f1fc25f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion crates/polars-row/src/encode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ fn allocate_rows_buf(
}
} else {
for (opt_val, row_length) in iter.zip(lengths.iter_mut()) {
*row_length += crate::variable::encoded_len(opt_val, &field)
*row_length += crate::variable::encoded_len(opt_val, &field) as u64;
}
}
processed_count += 1;
Expand Down
4 changes: 2 additions & 2 deletions crates/polars-row/src/fixed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -200,13 +200,13 @@ pub(crate) unsafe fn encode_iter<I: Iterator<Item = Option<T>>, T: FixedLengthEn
} else {
let usize_offset = *offset as usize;
unsafe {
*values.get_unchecked_mut(*usize_offset) = MaybeUninit::new(get_null_sentinel(field))
*values.get_unchecked_mut(usize_offset) = MaybeUninit::new(get_null_sentinel(field))
};

let end_offset = usize_offset + T::ENCODED_LEN;

// initialize remaining bytes
let remainder = values.get_unchecked_mut(*usize_offset + 1..end_offset);
let remainder = values.get_unchecked_mut(usize_offset + 1..end_offset);
remainder.fill(MaybeUninit::new(0));

*offset = end_offset as u64;
Expand Down

0 comments on commit f1fc25f

Please sign in to comment.