Trait lance_datagen::generator::ArrayGeneratorExt

source ·
pub trait ArrayGeneratorExt {
    // Required methods
    fn with_random_nulls(self, null_probability: f64) -> Box<dyn ArrayGenerator>;
    fn with_nulls(self, nulls: &[bool]) -> Box<dyn ArrayGenerator>;
    fn with_validity(self, nulls: &[bool]) -> Box<dyn ArrayGenerator>;
}

Required Methods§

source

fn with_random_nulls(self, null_probability: f64) -> Box<dyn ArrayGenerator>

Replaces the validity bitmap of generated arrays, inserting nulls with a given probability

source

fn with_nulls(self, nulls: &[bool]) -> Box<dyn ArrayGenerator>

Replaces the validity bitmap of generated arrays with the inverse of nulls, cycling if needed

source

fn with_validity(self, nulls: &[bool]) -> Box<dyn ArrayGenerator>

Replaces the validity bitmap of generated arrays with validity, cycling if needed

Implementations on Foreign Types§

source§

impl ArrayGeneratorExt for Box<dyn ArrayGenerator>

source§

fn with_random_nulls(self, null_probability: f64) -> Box<dyn ArrayGenerator>

source§

fn with_nulls(self, nulls: &[bool]) -> Box<dyn ArrayGenerator>

source§

fn with_validity(self, validity: &[bool]) -> Box<dyn ArrayGenerator>

Implementors§