Handles type coercion and null value refinement for default value argument depending on the data type of the input expression.
(
input_exprs: &[Arc<dyn PhysicalExpr>],
input_types: &[FieldRef],
)
| 389 | /// Handles type coercion and null value refinement for default value |
| 390 | /// argument depending on the data type of the input expression. |
| 391 | fn parse_default_value( |
| 392 | input_exprs: &[Arc<dyn PhysicalExpr>], |
| 393 | input_types: &[FieldRef], |
| 394 | ) -> Result<ScalarValue> { |
| 395 | let expr_field = parse_expr_field(input_types)?; |
| 396 | let unparsed = get_scalar_value_from_args(input_exprs, 2)?; |
| 397 | |
| 398 | unparsed |
| 399 | .filter(|v| !v.data_type().is_null()) |
| 400 | .map(|v| v.cast_to(expr_field.data_type())) |
| 401 | .unwrap_or_else(|| ScalarValue::try_from(expr_field.data_type())) |
| 402 | } |
| 403 | |
| 404 | #[derive(Debug)] |
| 405 | struct WindowShiftEvaluator { |
no test coverage detected
searching dependent graphs…