pub struct SampleInfo {
pub total_rows: u64,
pub sampled_rows: u64,
pub sampling_ratio: f64,
pub strategy: SamplingStrategy,
pub is_representative: bool,
pub confidence_margin: f64,
}Expand description
Information about the sampling process
Fields§
§total_rows: u64Total rows in the original table/query
sampled_rows: u64Number of rows in the sample
sampling_ratio: f64Sampling ratio (0.0 - 1.0)
strategy: SamplingStrategySampling strategy used
is_representative: boolWhether the sample is representative
confidence_margin: f64Estimated confidence interval for statistics
Implementations§
Source§impl SampleInfo
impl SampleInfo
Sourcepub fn new(
total_rows: u64,
sampled_rows: u64,
strategy: SamplingStrategy,
) -> Self
pub fn new( total_rows: u64, sampled_rows: u64, strategy: SamplingStrategy, ) -> Self
Create new sample info
Sourcepub fn get_warning(&self) -> Option<String>
pub fn get_warning(&self) -> Option<String>
Get a warning message if the sample might not be representative
Sourcepub fn get_recommendations(&self) -> Vec<String>
pub fn get_recommendations(&self) -> Vec<String>
Get recommended actions for improving sample quality
Trait Implementations§
Source§impl Clone for SampleInfo
impl Clone for SampleInfo
Source§fn clone(&self) -> SampleInfo
fn clone(&self) -> SampleInfo
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SampleInfo
impl Debug for SampleInfo
Source§impl<'de> Deserialize<'de> for SampleInfo
impl<'de> Deserialize<'de> for SampleInfo
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for SampleInfo
impl RefUnwindSafe for SampleInfo
impl Send for SampleInfo
impl Sync for SampleInfo
impl Unpin for SampleInfo
impl UnsafeUnpin for SampleInfo
impl UnwindSafe for SampleInfo
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
Mutably borrows from an owned value. Read more