Enum datafusion::physical_plan::ColumnarValue
source · [−]pub enum ColumnarValue {
Array(Arc<dyn Array + 'static>),
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
Array(Arc<dyn Array + 'static>)
Array of values
Scalar(ScalarValue)
A single value
Implementations
sourceimpl ColumnarValue
impl ColumnarValue
pub fn data_type(&self) -> DataType
sourcepub fn into_array(self, num_rows: usize) -> Arc<dyn Array + 'static>
pub fn into_array(self, num_rows: usize) -> Arc<dyn Array + 'static>
Convert a columnar value into an ArrayRef. Self::Scalar
is
converted by repeating the same scalar multiple times.
Trait Implementations
sourceimpl Clone for ColumnarValue
impl Clone for ColumnarValue
sourcefn clone(&self) -> ColumnarValue
fn clone(&self) -> ColumnarValue
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for ColumnarValue
impl Debug for ColumnarValue
sourceimpl From<&RecordBatch> for ColumnarValue
impl From<&RecordBatch> for ColumnarValue
sourcefn from(batch: &RecordBatch) -> ColumnarValue
fn from(batch: &RecordBatch) -> ColumnarValue
Converts to this type from the input type.
Auto Trait Implementations
impl !RefUnwindSafe for ColumnarValue
impl Send for ColumnarValue
impl Sync for ColumnarValue
impl Unpin for ColumnarValue
impl !UnwindSafe for ColumnarValue
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more