Skip to main content

Module data_gen

Module data_gen 

Source
Expand description

Utilities to generate random arrays and batches

Re-exportsยง

use std::sync::Arc; ๐Ÿ”’
use rand::Rng; ๐Ÿ”’
use rand::RngExt; ๐Ÿ”’
use rand::distr::uniform::SampleRange; ๐Ÿ”’
use rand::distr::uniform::SampleUniform; ๐Ÿ”’
use crate::error::ArrowError; ๐Ÿ”’
use crate::error::Result; ๐Ÿ”’
use crate::buffer::Buffer; ๐Ÿ”’
use crate::buffer::MutableBuffer; ๐Ÿ”’
use super::bit_util; ๐Ÿ”’
use super::test_util::seedable_rng; ๐Ÿ”’
use crate::array::*; ๐Ÿ”’
use crate::datatypes::*; ๐Ÿ”’
use super::bench_util::*; ๐Ÿ”’

Traitsยง

RandomTemporalValue
Useful for testing. The range of values are not likely to be representative of the actual bounds.

Functionsยง

create_random_array
Create a random ArrayRef from a DataType with a length, null density and true density (for BooleanArray).
create_random_batch
Create a random RecordBatch from a schema
create_random_decimal_array ๐Ÿ”’
create_random_list_array ๐Ÿ”’
create_random_map_array ๐Ÿ”’
create_random_null_buffer ๐Ÿ”’
create_random_offsets ๐Ÿ”’
Generate random offsets for list arrays
create_random_run_end_encoded_array ๐Ÿ”’
create_random_struct_array ๐Ÿ”’
create_random_temporal_array ๐Ÿ”’