Skip to main content

OneTableFourColumns

Struct OneTableFourColumns 

Source
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

Source

pub fn oid_column(&self) -> &FixedSizeBinaryArray

Source

pub fn column_is_inside_ipc(&self) -> bool

All five arrays are views into the one IPC buffer.

Source

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

Source§

fn build(entries: &[IndexEntry]) -> Result<Self>

Source§

fn lookup(&self, oid: &[u8]) -> Option<IndexRow>

Resolve one oid. None for an absent oid and for an oid of the wrong width.
Source§

fn lookup_batch(&self, oids: &[&[u8]]) -> Vec<Option<IndexRow>>

The batch path, and the one that matters: have negotiation sends up to 1000 oids at a time, the push connectivity check sends thousands. Positional — out[i] answers oids[i]. Read more
Source§

fn ordinals_batch(&self, oids: &[&[u8]]) -> Vec<Option<u32>>

oid → ordinal and stop. No payload column is touched at all. Read more
Source§

fn extents_batch(&self, oids: &[&[u8]]) -> Vec<Option<(u64, u64)>>

The partial-row access pattern: byte extent only, two of the five facts. This is 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

Full column scan: total uncompressed bytes over every object. The quota gate. Reads one 8-byte fact per row and nothing else.
Source§

fn count_type(&self, t: ObjType) -> usize

Full column scan with a predicate: how many objects of this type. Reads one byte per row and nothing else — the most column-shaped query there is, and the one a row-packed layout should lose worst.
Source§

fn name(&self) -> &'static str

Source§

fn len(&self) -> usize

Source§

fn ipc_bytes(&self) -> usize

Total bytes of Arrow IPC this index holds resident. Four sections or one, this counts the same payload, so it is comparable across arms.
Source§

fn resident_bytes(&self) -> usize

IPC bytes plus the stree oid section — everything the index keeps alive, excluding the handful of Arc’d schema/metadata allocations.
Source§

fn is_empty(&self) -> bool

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Allocation for T
where T: RefUnwindSafe + Send + Sync,

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.