1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/// Helper to delay a failing method until the query plan is collected
#[macro_export]
macro_rules! fallible {
    ($e:expr, $lf:expr) => {{
        use $crate::prelude::*;
        match $e {
            Ok(e) => e,
            Err(err) => {
                let lf: LazyFrame = LogicalPlanBuilder::from($lf.clone().logical_plan)
                    .add_err(err)
                    .0
                    .into();
                return lf;
            },
        }
    }};
}