ArrayGeneratorExt

Trait 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_nans(self, nans: &[bool]) -> Box<dyn ArrayGenerator>;
    fn with_validity(self, nulls: &[bool]) -> Box<dyn ArrayGenerator>;
    fn with_metadata(
        self,
        metadata: HashMap<String, String>,
    ) -> 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_nans(self, nans: &[bool]) -> Box<dyn ArrayGenerator>

Replaces the values of generated arrays with NaN values, cycling if needed

Will have no effect if the data type is not a floating point data type

Source

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

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

Source

fn with_metadata( self, metadata: HashMap<String, String>, ) -> Box<dyn ArrayGenerator>

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_nans(self, nans: &[bool]) -> Box<dyn ArrayGenerator>

Source§

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

Source§

fn with_metadata( self, metadata: HashMap<String, String>, ) -> Box<dyn ArrayGenerator>

Implementors§