Skip to content

Commit

Permalink
bugfix: deleted skip was broken
Browse files Browse the repository at this point in the history
  • Loading branch information
Codetector1374 committed Aug 6, 2024
1 parent 3104178 commit 5cd22e2
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/bin/page_explorer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,12 @@ struct PageExplorer {
}

impl PageExplorer {
fn write_row(&mut self, values: &[FieldValue]) -> Result<()> {
fn write_row(&mut self, deleted: bool, values: &[FieldValue]) -> Result<()> {
let mut has_missing = false;
if let Some(writer) = &mut self.output_writer {
writer.begin_object()?;
writer.name("_deleted")?;
writer.bool_value(deleted)?;

let td = self.table_def.as_ref().unwrap();
for (idx, col) in td
Expand Down Expand Up @@ -123,11 +125,7 @@ impl PageExplorer {
let values = row.parse_values(self.buffer_mgr.as_mut());
assert_eq!(values.len(), table.field_count());
debug!("{:?}", values);
if row.record.header.info_flags.deleted {
info!("Skipping Deleted Row");
continue;
}
self.write_row(&values).expect("Failed to write row");
self.write_row(row.record.header.info_flags.deleted, &values).expect("Failed to write row");
}
}
RecordType::NodePointer => {
Expand Down

0 comments on commit 5cd22e2

Please sign in to comment.