struct CaseBody {
expr: Option<Arc<dyn PhysicalExpr>>,
when_then_expr: Vec<(Arc<dyn PhysicalExpr>, Arc<dyn PhysicalExpr>)>,
else_expr: Option<Arc<dyn PhysicalExpr>>,
}Expand description
The body of a CASE expression which consists of an optional base expression, the “when/then” branches and an optional “else” branch.
Fields§
§expr: Option<Arc<dyn PhysicalExpr>>Optional base expression that can be compared to literal values in the “when” expressions
when_then_expr: Vec<(Arc<dyn PhysicalExpr>, Arc<dyn PhysicalExpr>)>One or more when/then expressions
else_expr: Option<Arc<dyn PhysicalExpr>>Optional “else” expression
Implementations§
Source§impl CaseBody
impl CaseBody
Sourcefn project(&self) -> Result<ProjectedCaseBody>
fn project(&self) -> Result<ProjectedCaseBody>
Derives a ProjectedCaseBody from this CaseBody.
Source§impl CaseBody
impl CaseBody
fn data_type(&self, input_schema: &Schema) -> Result<DataType>
Sourcefn case_when_with_expr(
&self,
batch: &RecordBatch,
return_type: &DataType,
) -> Result<ColumnarValue>
fn case_when_with_expr( &self, batch: &RecordBatch, return_type: &DataType, ) -> Result<ColumnarValue>
Sourcefn case_when_no_expr(
&self,
batch: &RecordBatch,
return_type: &DataType,
) -> Result<ColumnarValue>
fn case_when_no_expr( &self, batch: &RecordBatch, return_type: &DataType, ) -> Result<ColumnarValue>
Sourcefn expr_or_expr(
&self,
batch: &RecordBatch,
when_value: &BooleanArray,
) -> Result<ColumnarValue>
fn expr_or_expr( &self, batch: &RecordBatch, when_value: &BooleanArray, ) -> Result<ColumnarValue>
Trait Implementations§
impl Eq for CaseBody
impl StructuralPartialEq for CaseBody
Auto Trait Implementations§
impl Freeze for CaseBody
impl !RefUnwindSafe for CaseBody
impl Send for CaseBody
impl Sync for CaseBody
impl Unpin for CaseBody
impl !UnwindSafe for CaseBody
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
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
Converts
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>
Converts
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