-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers
Description
Is your feature request related to a problem or challenge?
As part of the review for #13953 @2010YOUY01 brought up that some of the error handling code in datafusion/physical-expr/src/expressions/case.rs can be simplified, due to type checks being performed before evaluation.
This will clean-up and simplify the code a little bit.
Describe the solution you'd like
Replace occurences similar to
DataFusionError::Context(
"WHEN expression did not return a BooleanArray".to_string(),
Box::new(e),
)and
let expr = try_cast(Arc::clone(e), &batch.schema(), return_type.clone())
.unwrap_or_else(|_| Arc::clone(e));with code that returns an internal error directly
Describe alternatives you've considered
No response
Additional context
Link to suggestions from the review:
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers