pub struct OneTableFourColumns { /* private fields */ }Expand description
One Arrow IPC section, one table, the facts one column each.
Arrow is columnar, so this is not row-contiguous: offset is its own
buffer, len is its own buffer, and a full-row fetch still touches five
strides that are megabytes apart. What it saves over FourTables is the
framing of three IPC streams and nothing else — which is exactly what the
measurement found.
The name counts the columns it had when it was named and measured; since
delta_base (PLAN §13) there are five payload columns here and in
FourTables alike, so the two are still separated by section count and
nothing else.
Implementations§
Source§impl OneTableFourColumns
impl OneTableFourColumns
pub fn oid_column(&self) -> &FixedSizeBinaryArray
Sourcepub fn column_is_inside_ipc(&self) -> bool
pub fn column_is_inside_ipc(&self) -> bool
All five arrays are views into the one IPC buffer.
Sourcepub fn ipc_slice(&self) -> &[u8] ⓘ
pub fn ipc_slice(&self) -> &[u8] ⓘ
The bytes this index would be persisted as — the single Arrow IPC
stream every column is a view into, exactly as [to_ipc] framed it.
ObjectIndex::ipc_bytes reports this buffer’s length, which is
enough to compare two layouts’ footprints and not enough to write one
down. examples/tail_write_bench.rs needs the bytes themselves: its
no-tail arm has to rewrite the whole index on every push, and a
measurement of that write is only honest if the bytes going to the file
are the index’s own and not a stand-in of the same size.
A borrowed slice and not a Vec: the buffer is already resident and
aligned, and handing out a copy would put an allocation inside the very
write this exists to measure.
Trait Implementations§
Source§impl ObjectIndex for OneTableFourColumns
impl ObjectIndex for OneTableFourColumns
fn build(entries: &[IndexEntry]) -> Result<Self>
Source§fn lookup(&self, oid: &[u8]) -> Option<IndexRow>
fn lookup(&self, oid: &[u8]) -> Option<IndexRow>
None for an absent oid and for an oid of the
wrong width.Source§fn lookup_batch(&self, oids: &[&[u8]]) -> Vec<Option<IndexRow>>
fn lookup_batch(&self, oids: &[&[u8]]) -> Vec<Option<IndexRow>>
have negotiation sends up to
1000 oids at a time, the push connectivity check sends thousands.
Positional — out[i] answers oids[i]. Read moreSource§fn ordinals_batch(&self, oids: &[&[u8]]) -> Vec<Option<u32>>
fn ordinals_batch(&self, oids: &[&[u8]]) -> Vec<Option<u32>>
Source§fn extents_batch(&self, oids: &[&[u8]]) -> Vec<Option<(u64, u64)>>
fn extents_batch(&self, oids: &[&[u8]]) -> Vec<Option<(u64, u64)>>
extents(&[oid]), what the wire path actually asks for
when it is about to copy bytes out of a pack.Source§fn sum_uncompressed(&self) -> u64
fn sum_uncompressed(&self) -> u64
Source§fn count_type(&self, t: ObjType) -> usize
fn count_type(&self, t: ObjType) -> usize
fn name(&self) -> &'static str
fn len(&self) -> usize
Source§fn ipc_bytes(&self) -> usize
fn ipc_bytes(&self) -> usize
Source§fn resident_bytes(&self) -> usize
fn resident_bytes(&self) -> usize
stree oid section — everything the index keeps
alive, excluding the handful of Arc’d schema/metadata allocations.