A very crude approximation for scalar expressions that might produce an error. Currently, this is restricted only to expressions that either contain a literal error or a [`VariadicFunc::ErrorIfNull`] call.
(&self)
| 644 | /// Currently, this is restricted only to expressions that either contain a |
| 645 | /// literal error or a [`VariadicFunc::ErrorIfNull`] call. |
| 646 | pub fn might_error(&self) -> bool { |
| 647 | let mut worklist = vec![self]; |
| 648 | while let Some(expr) = worklist.pop() { |
| 649 | if expr.is_literal_err() || expr.is_error_if_null() { |
| 650 | return true; |
| 651 | } |
| 652 | worklist.extend(expr.children()); |
| 653 | } |
| 654 | false |
| 655 | } |
| 656 | |
| 657 | /// Reduces a complex expression where possible. |
| 658 | /// |
no test coverage detected