Skip to content

Commit

Permalink
remove yielded pointers tracking, it's unused
Browse files Browse the repository at this point in the history
  • Loading branch information
Centril committed Dec 6, 2024
1 parent 96a3871 commit 6988078
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 22 deletions.
2 changes: 1 addition & 1 deletion crates/core/src/vm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ pub struct IndexSemiJoinLeft<'a, 'c, Rhs: RelOps<'a>> {
pub tx: &'a TxMode<'a>,
}

static_assert_size!(IndexSemiJoinLeft<Box<IterRows<'static>>>, 280);
static_assert_size!(IndexSemiJoinLeft<Box<IterRows<'static>>>, 264);

impl<'a, Rhs: RelOps<'a>> IndexSemiJoinLeft<'a, '_, Rhs> {
fn filter(&self, index_row: &RelValue<'_>) -> bool {
Expand Down
15 changes: 1 addition & 14 deletions crates/table/src/btree_index.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,25 +84,13 @@ impl Iterator for TypedMultiMapRangeIter<'_> {
pub struct BTreeIndexRangeIter<'a> {
/// The iterator seeking for matching values.
iter: TypedMultiMapRangeIter<'a>,
/// The number of pointers yielded thus far.
num_pointers_yielded: u64,
}

impl Iterator for BTreeIndexRangeIter<'_> {
type Item = RowPointer;

fn next(&mut self) -> Option<Self::Item> {
self.iter.next().map(|ptr| {
self.num_pointers_yielded += 1;
ptr
})
}
}

impl BTreeIndexRangeIter<'_> {
/// Returns the current number of pointers the iterator has returned thus far.
pub fn num_pointers_yielded(&self) -> u64 {
self.num_pointers_yielded
self.iter.next()
}
}

Expand Down Expand Up @@ -491,7 +479,6 @@ impl BTreeIndex {
pub fn seek(&self, range: &impl RangeBounds<AlgebraicValue>) -> BTreeIndexRangeIter<'_> {
BTreeIndexRangeIter {
iter: self.idx.values_in_range(range),
num_pointers_yielded: 0,
}
}

Expand Down
7 changes: 0 additions & 7 deletions crates/table/src/table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1052,13 +1052,6 @@ impl<'a> Iterator for IndexScanIter<'a> {
}
}

impl IndexScanIter<'_> {
/// Returns the current number of pointers the iterator has returned thus far.
pub fn num_pointers_yielded(&self) -> u64 {
self.btree_index_iter.num_pointers_yielded()
}
}

#[derive(Error, Debug, PartialEq, Eq)]
#[error("Unique constraint violation '{}' in table '{}': column(s): '{:?}' value: {}", constraint_name, table_name, cols, value.to_satn())]
pub struct UniqueConstraintViolation {
Expand Down

0 comments on commit 6988078

Please sign in to comment.