Skip to main content

StreamingColumnCollection

Struct StreamingColumnCollection 

Source
pub struct StreamingColumnCollection { /* private fields */ }

Implementations§

Source§

impl StreamingColumnCollection

Source

pub fn new() -> Self

Source

pub fn memory_limit(limit_mb: usize) -> Self

Source

pub fn with_semantic_hints(self, hints: &SemanticHints) -> Self

Configure value-driven semantic hints before records are processed.

Source

pub fn init_columns(&mut self, headers: &[String])

Source

pub fn init_column_with_missing(&mut self, header: &str, prior_rows: usize)

Add a column discovered after prior_rows records have already passed.

JSON objects may introduce keys at any point in a stream. Those earlier objects are missing the new key, so the column must start with matching total/null counters rather than looking shorter and more complete than the dataset.

Source

pub fn process_record<I>(&mut self, headers: &[String], values: I)
where I: IntoIterator<Item = String>,

Source

pub fn process_record_with_containers<I>( &mut self, headers: &[String], values: I, containers: &[usize], )
where I: IntoIterator<Item = String>,

process_record for a record whose fields at containers (positions in headers) were JSON objects or arrays, given as their text. Their statistics read the text like any other value; only the row signature tells them apart from a string that spells the same text (#945).

Source

pub fn row_duplicate_summary(&self) -> Option<RowDuplicateSummary>

Full-stream row-duplicate counts, or None when no rows were seen.

Source

pub fn row_completeness_summary(&self) -> Option<RowCompletenessSummary>

Full-stream complete-record counts, or None when no rows were seen.

Source

pub fn semantic_hint_bindings(&self) -> Vec<SemanticHintBinding>

Exact value-driven semantic-hint evidence over every processed record.

Source

pub fn get_column_stats( &self, column_name: &str, ) -> Option<&StreamingStatistics>

Source

pub fn column_names(&self) -> Vec<String>

Source

pub fn retain_columns(&mut self, names: &[String])

Retain only the selected columns, preserving their source order.

Parsers call this after validating the selection against the complete source schema. Row-level trackers intentionally remain unchanged; a projected report withholds the row-level quality dimensions because their meaning changes when columns are removed.

Source

pub fn memory_usage_bytes(&self) -> usize

Source

pub fn is_memory_pressure(&self) -> bool

Source

pub fn reduce_memory_usage(&mut self)

Source

pub fn column_type_fingerprint(&self) -> u64

Fingerprint of each column’s currently inferred data type.

Returns a u64 hash suitable for cheap comparison in a schema stability tracker.

Source

pub fn merge(&mut self, other: StreamingColumnCollection)

Fold another collection into this one, as if a single pass had read both sides.

The merged profile describes the union of the two schemas, and three consequences of that are each a silently wrong number when skipped:

  • A column only one side saw has to join ordered_names, or Self::column_names omits it and the column vanishes from the report while its statistics sit unreachable in the map.
  • That column is absent from every record the other side read, so it is padded with those rows as missing values, the way Self::init_column_with_missing pads a key that appears mid-stream. Skipping the padding leaves the column looking shorter and more complete than the dataset.
  • Rows counted complete against the narrower schema are not complete against the union, so that side’s complete-row count is invalidated for the same reason.

Row signatures are built per record from that record’s own headers, and encode values only. Two sides that read different columns, or the same columns in a different order, therefore sign different rows identically. Those signatures cannot be rebuilt against the union schema once folded into the estimator, so the merged duplicate count is withheld rather than reported wrong.

Trait Implementations§

Source§

impl Default for StreamingColumnCollection

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

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, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V