Skip to content

Commit

Permalink
fix: names
Browse files Browse the repository at this point in the history
  • Loading branch information
v0y4g3r committed Mar 1, 2024
1 parent 35a1969 commit 4a28cad
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/mito2/src/memtable/merge_tree/partition.rs
Original file line number Diff line number Diff line change
Expand Up @@ -593,9 +593,9 @@ impl Inner {
}
}

fn find_key_in_shards(&self, short_key: &[u8]) -> Option<PkId> {
fn find_key_in_shards(&self, primary_key: &[u8]) -> Option<PkId> {
assert!(!self.frozen);
self.pk_to_pk_id.get(short_key).copied()
self.pk_to_pk_id.get(primary_key).copied()
}

fn write_to_shard(&mut self, pk_id: PkId, key_value: &KeyValue) {
Expand Down
10 changes: 5 additions & 5 deletions src/mito2/src/memtable/merge_tree/tree.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ pub struct MergeTree {
is_partitioned: bool,
/// Manager to report size of the tree.
write_buffer_manager: Option<WriteBufferManagerRef>,
sparse_encoder: Arc<ShortEncoder>,
sparse_encoder: Arc<SparseEncoder>,
}

impl MergeTree {
Expand All @@ -73,7 +73,7 @@ impl MergeTree {
.map(|c| SortField::new(c.column_schema.data_type.clone()))
.collect(),
);
let short_encoder = ShortEncoder {
let sparse_encoder = SparseEncoder {
fields: metadata
.primary_key_columns()
.map(|c| FieldWithId {
Expand All @@ -91,7 +91,7 @@ impl MergeTree {
partitions: Default::default(),
is_partitioned,
write_buffer_manager,
sparse_encoder: Arc::new(short_encoder),
sparse_encoder: Arc::new(sparse_encoder),
}
}

Expand Down Expand Up @@ -356,11 +356,11 @@ struct FieldWithId {
column_id: ColumnId,
}

struct ShortEncoder {
struct SparseEncoder {
fields: Vec<FieldWithId>,
}

impl ShortEncoder {
impl SparseEncoder {
fn encode_to_vec<'a, I>(&self, row: I, buffer: &mut Vec<u8>) -> Result<()>
where
I: Iterator<Item = ValueRef<'a>>,
Expand Down

0 comments on commit 4a28cad

Please sign in to comment.