(
lit_value: &ScalarValue,
target_type: &DataType,
)
| 398 | } |
| 399 | |
| 400 | fn try_cast_binary( |
| 401 | lit_value: &ScalarValue, |
| 402 | target_type: &DataType, |
| 403 | ) -> Option<ScalarValue> { |
| 404 | match (lit_value, target_type) { |
| 405 | (ScalarValue::Binary(Some(v)), DataType::FixedSizeBinary(n)) |
| 406 | if v.len() == *n as usize => |
| 407 | { |
| 408 | Some(ScalarValue::FixedSizeBinary(*n, Some(v.clone()))) |
| 409 | } |
| 410 | _ => None, |
| 411 | } |
| 412 | } |
| 413 | |
| 414 | #[cfg(test)] |
| 415 | mod tests { |
no test coverage detected
searching dependent graphs…