Skip to content

Commit

Permalink
remove unuseds.
Browse files Browse the repository at this point in the history
  • Loading branch information
Rachelint committed Aug 30, 2024
1 parent 12720dc commit 93c7f88
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ use std::{
collections::VecDeque,
fmt::{self, Debug},
iter,
ops::{Index, IndexMut, Shl},
ops::{Index, IndexMut},
};

use arrow::{
Expand Down Expand Up @@ -486,6 +486,7 @@ impl BlockedGroupIndex {
pub struct BlockedGroupIndexBuilder {
block_id_mask: u64,
block_offset_mask: u64,
id_shift: u64,
}

impl BlockedGroupIndexBuilder {
Expand All @@ -494,19 +495,21 @@ impl BlockedGroupIndexBuilder {
Self {
block_id_mask: BLOCKED_GROUP_INDEX_ID_MASK,
block_offset_mask: BLOCKED_GROUP_INDEX_OFFSET_MASK,
id_shift: 32,
}
} else {
Self {
block_id_mask: FLAT_GROUP_INDEX_ID_MASK,
block_offset_mask: FLAT_GROUP_INDEX_OFFSET_MASK,
id_shift: 0,
}
}
}

#[inline]
pub fn build(&self, packed_index: usize) -> BlockedGroupIndex {
let packed_index = packed_index as u64;
let block_id = ((packed_index & self.block_id_mask) >> 32) as u32;
let block_id = ((packed_index & self.block_id_mask) >> self.id_shift) as u32;
let block_offset = packed_index & self.block_offset_mask;

BlockedGroupIndex {
Expand Down

0 comments on commit 93c7f88

Please sign in to comment.