pub(crate) struct Block {
signal: Signal,
pub(crate) root: RecordBatch,
attrs: Option<Attrs>,
resource_attrs: Option<Attrs>,
scope_attrs: Option<Attrs>,
children: Vec<Child>,
}Expand description
The tables of one block, opened and ready to scan.
No Mmap handle is kept: every Arrow buffer read out of a block owns an
Arc<Mmap> of its own (see block::open_table), so holding the
RecordBatch is what holds the mapping. That is also why row data can be
borrowed straight out of these batches with ordinary lifetimes.
Fields§
§signal: Signal§root: RecordBatch§attrs: Option<Attrs>Record-level attributes; parent_id indexes root directly.
resource_attrs: Option<Attrs>§scope_attrs: Option<Attrs>§children: Vec<Child>Rows that hang off a root row rather than being one: a span’s events and its links. Empty for logs.
Implementations§
Source§impl Block
impl Block
fn open(bref: &Src<'_>, signal: Signal) -> Result<Option<Block>>
Sourcefn time(&self) -> Option<&[i64]>
fn time(&self) -> Option<&[i64]>
The root’s time column as a raw slice, straight out of the mapping.
Sourcefn select(&self, q: &Search, bref: &Src<'_>) -> Vec<u32>
fn select(&self, q: &Search, bref: &Src<'_>) -> Vec<u32>
Row numbers of root matching the query, ascending.
Sourcefn attr_rows(&self, key: &str, op: Op, value: &Value, n: usize) -> Vec<bool>
fn attr_rows(&self, key: &str, op: Op, value: &Value, n: usize) -> Vec<bool>
A bitmap over root rows: does this record carry key op value at any
attribute level it has — record, resource, scope, or one of its own
child rows?
Sourcefn emit_row(&self, j: &mut Json, row: u32)
fn emit_row(&self, j: &mut Json, row: u32)
Write one root row as a JSON object, attributes merged in and child rows nested under it.
Sourcefn emit_children(&self, j: &mut Json, c: &Child, row: u32)
fn emit_children(&self, j: &mut Json, c: &Child, row: u32)
The events / links array of one span.
Reads the index built when the block was opened. It used to be a linear
pass over the child table per emitted row, on the argument that limit
bounds the row count — but the other factor is the block’s event count,
so the product is limit × events-in-block, and a block holds hundreds
of thousands of events. One pass at open time replaces all of them.
fn fk(&self, row: u32, name: &str) -> Option<u32>
Auto Trait Implementations§
impl !RefUnwindSafe for Block
impl !UnwindSafe for Block
impl Freeze for Block
impl Send for Block
impl Sync for Block
impl Unpin for Block
impl UnsafeUnpin for Block
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered].