pub enum StopCondition {
MaxRows(u64),
MaxBytes(u64),
SchemaStable {
consecutive_stable_rows: u64,
},
ConfidenceThreshold(f64),
MemoryPressure(f64),
Any(Vec<StopCondition>),
All(Vec<StopCondition>),
Never,
}Expand description
A composable condition that can trigger early termination of profiling.
Conditions are checked per-chunk (not per-row) for performance. The actual row count at termination may slightly exceed the limit.
Variants§
MaxRows(u64)
Stop after processing this many rows.
MaxBytes(u64)
Stop after consuming this many bytes from the source.
SchemaStable
Stop when column types have not changed for approximately N rows (accumulated across chunks).
Fields
ConfidenceThreshold(f64)
Stop when rows_processed / estimated_total >= threshold.
Only meaningful when an estimated total row count is available. When no estimate exists, this condition is inert.
MemoryPressure(f64)
Stop when memory usage exceeds this fraction of the configured limit.
Value in 0.0..=1.0 (e.g., 0.9 = 90% of memory limit).
Any(Vec<StopCondition>)
Stop when any sub-condition triggers.
All(Vec<StopCondition>)
Stop when all sub-conditions have triggered.
Never
Never stop early — process the entire stream (default).
Implementations§
Source§impl StopCondition
impl StopCondition
Sourcepub fn schema_inference() -> Self
pub fn schema_inference() -> Self
Preset for schema-only profiling: stop after 10K rows or when schema stabilizes (no type changes for 1,000 consecutive rows).
Sourcepub fn quality_sample() -> Self
pub fn quality_sample() -> Self
Preset for quality sampling: stop after 50K rows, 50 MB, or 95% confidence.
Trait Implementations§
Source§impl Clone for StopCondition
impl Clone for StopCondition
Source§fn clone(&self) -> StopCondition
fn clone(&self) -> StopCondition
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more