pub enum BenchmarkArgSpec {
Point,
LineString(usize),
Polygon(usize),
MultiPoint(usize),
Float64(f64, f64),
Transformed(Box<BenchmarkArgSpec>, ScalarUDF),
String(String),
Raster(usize, usize),
}Expand description
Specification of a single argument to a function
Geometries are generated using the RandomPartitionedDataBuilder, which offers more specific options for generating random geometries.
Variants§
Point
Randomly generated point input
LineString(usize)
Randomly generated linestring input with a specified number of vertices
Polygon(usize)
Randomly generated polygon input with a specified number of vertices
MultiPoint(usize)
Randomly generated linestring input with a specified number of vertices
Float64(f64, f64)
Randomly generated floating point input with a given range of values
Transformed(Box<BenchmarkArgSpec>, ScalarUDF)
A transformation of any of the above based on a ScalarUDF accepting a single argument
String(String)
A string that will be a constant
Raster(usize, usize)
Randomly generated raster input with a specified width, height
Implementations§
Source§impl BenchmarkArgSpec
impl BenchmarkArgSpec
Sourcepub fn sedona_type(&self) -> SedonaType
pub fn sedona_type(&self) -> SedonaType
The SedonaType of this argument
Sourcepub fn build_scalar(&self, i: usize) -> Result<ScalarValue>
pub fn build_scalar(&self, i: usize) -> Result<ScalarValue>
Build a ScalarValue for this argument
This currently builds the same non-null scalar for each unique value of i (the argument number).
Sourcepub fn build_arrays(
&self,
i: usize,
num_batches: usize,
rows_per_batch: usize,
) -> Result<Vec<ArrayRef>>
pub fn build_arrays( &self, i: usize, num_batches: usize, rows_per_batch: usize, ) -> Result<Vec<ArrayRef>>
Build a column of num_batches arrays
This currently builds the same column for each unique value of i (the argument number). The batch size is currently fixed to 8192 (the DataFusion default).
Trait Implementations§
Source§impl Clone for BenchmarkArgSpec
impl Clone for BenchmarkArgSpec
Source§fn clone(&self) -> BenchmarkArgSpec
fn clone(&self) -> BenchmarkArgSpec
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for BenchmarkArgSpec
impl Debug for BenchmarkArgSpec
Source§impl From<BenchmarkArgSpec> for BenchmarkArgs
impl From<BenchmarkArgSpec> for BenchmarkArgs
Source§fn from(value: BenchmarkArgSpec) -> Self
fn from(value: BenchmarkArgSpec) -> Self
Auto Trait Implementations§
impl Freeze for BenchmarkArgSpec
impl !RefUnwindSafe for BenchmarkArgSpec
impl Send for BenchmarkArgSpec
impl Sync for BenchmarkArgSpec
impl Unpin for BenchmarkArgSpec
impl !UnwindSafe for BenchmarkArgSpec
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more