Skip to content

Commit

Permalink
Add accessor for column data on Row
Browse files Browse the repository at this point in the history
  • Loading branch information
judahrand committed Sep 22, 2023
1 parent a729f47 commit 7c199eb
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions arrow-row/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -996,6 +996,12 @@ impl<'a> Row<'a> {
config: self.config.clone(),
}
}

pub fn column(&self, column: usize) -> &[u8] {
let start = self.offsets[column];
let end = self.offsets[column + 1];
&self.data[start..end]
}
}

// Manually derive these as don't wish to include `fields`
Expand Down

0 comments on commit 7c199eb

Please sign in to comment.