Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
pola-rs
GitHub Repository: pola-rs/polars
Path: blob/main/crates/polars-lazy/src/frame/err.rs
6939 views
1
/// Helper to delay a failing method until the query plan is collected
2
#[macro_export]
3
macro_rules! fallible {
4
($e:expr, $lf:expr) => {{
5
use $crate::prelude::*;
6
match $e {
7
Ok(e) => e,
8
Err(err) => {
9
let lf: LazyFrame = LogicalPlanBuilder::from($lf.clone().logical_plan)
10
.add_err(err)
11
.0
12
.into();
13
return lf;
14
},
15
}
16
}};
17
}
18
19