Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions arrow-buffer/src/bigint/div.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ pub fn div_rem<const N: usize>(numerator: &[u64; N], divisor: &[u64; N]) -> ([u6
return div_rem_small(numerator, divisor[0]);
}

let numerator_words = (numerator_bits + 63) / 64;
let divisor_words = (divisor_bits + 63) / 64;
let numerator_words = numerator_bits.div_ceil(64);
let divisor_words = divisor_bits.div_ceil(64);
let n = divisor_words;
let m = numerator_words - divisor_words;

Expand Down
2 changes: 1 addition & 1 deletion arrow-buffer/src/util/bit_chunk_iterator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ impl<'a> UnalignedBitChunk<'a> {
let byte_offset = offset / 8;
let offset_padding = offset % 8;

let bytes_len = (len + offset_padding + 7) / 8;
let bytes_len = (len + offset_padding).div_ceil(8);
let buffer = &buffer[byte_offset..byte_offset + bytes_len];

let prefix_mask = compute_prefix_mask(offset_padding);
Expand Down
2 changes: 1 addition & 1 deletion arrow/benches/buffer_create.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ fn mutable_buffer_iter_bitset(data: &[Vec<bool>]) -> Vec<Buffer> {
data.iter()
.map(|datum| {
let mut result =
MutableBuffer::new((data.len() + 7) / 8).with_bitset(datum.len(), false);
MutableBuffer::new(data.len().div_ceil(8)).with_bitset(datum.len(), false);
for (i, value) in datum.iter().enumerate() {
if *value {
unsafe {
Expand Down
2 changes: 1 addition & 1 deletion parquet/src/arrow/array_reader/fixed_size_list_array.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ impl ArrayReader for FixedSizeListArrayReader {

fn consume_batch(&mut self) -> Result<ArrayRef> {
let next_batch_array = self.item_reader.consume_batch()?;
if next_batch_array.len() == 0 {
if next_batch_array.is_empty() {
return Ok(new_empty_array(&self.data_type));
}

Expand Down
2 changes: 1 addition & 1 deletion parquet/src/arrow/array_reader/list_array.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ impl<OffsetSize: OffsetSizeTrait> ArrayReader for ListArrayReader<OffsetSize> {

fn consume_batch(&mut self) -> Result<ArrayRef> {
let next_batch_array = self.item_reader.consume_batch()?;
if next_batch_array.len() == 0 {
if next_batch_array.is_empty() {
return Ok(new_empty_array(&self.data_type));
}

Expand Down
Loading