Enum datafusion_expr::ColumnarValue
source · pub enum ColumnarValue {
Array(ArrayRef),
Scalar(ScalarValue),
}
Expand description
Represents the result of evaluating an expression: either a single
ScalarValue
or an [ArrayRef
].
While a ColumnarValue
can always be converted into an array
for convenience, it is often much more performant to provide an
optimized path for scalar values.
Variants§
Implementations§
source§impl ColumnarValue
impl ColumnarValue
pub fn data_type(&self) -> DataType
sourcepub fn into_array(self, num_rows: usize) -> ArrayRef
pub fn into_array(self, num_rows: usize) -> ArrayRef
Convert a columnar value into an ArrayRef. Self::Scalar
is
converted by repeating the same scalar multiple times.
sourcepub fn create_null_array(num_rows: usize) -> Self
pub fn create_null_array(num_rows: usize) -> Self
null columnar values are implemented as a null array in order to pass batch num_rows
Trait Implementations§
source§impl Clone for ColumnarValue
impl Clone for ColumnarValue
source§fn clone(&self) -> ColumnarValue
fn clone(&self) -> ColumnarValue
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for ColumnarValue
impl Send for ColumnarValue
impl Sync for ColumnarValue
impl Unpin for ColumnarValue
impl !UnwindSafe for ColumnarValue
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