We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a7de15e commit 6043e97Copy full SHA for 6043e97
src/substrait.rs
@@ -45,14 +45,14 @@ impl PyPlan {
45
46
/// Get the JSON representation of the substrait plan
47
fn to_json(&self) -> PyDataFusionResult<String> {
48
- let json = serde_json::to_string_pretty(&self.plan).map_err(|e| to_datafusion_err(e))?;
+ let json = serde_json::to_string_pretty(&self.plan).map_err(to_datafusion_err)?;
49
Ok(json)
50
}
51
52
/// Parse a Substrait Plan from its JSON representation
53
#[staticmethod]
54
fn from_json(json: &str) -> PyDataFusionResult<PyPlan> {
55
- let plan: Plan = serde_json::from_str(json).map_err(|e| to_datafusion_err(e))?;
+ let plan: Plan = serde_json::from_str(json).map_err(to_datafusion_err)?;
56
Ok(PyPlan { plan })
57
58
0 commit comments