Skip to content

Commit

Permalink
Add DataFusionError::Substrait variant to DataFusionError enum (#4971)
Browse files Browse the repository at this point in the history
  • Loading branch information
jdye64 committed Jan 18, 2023
1 parent 8a34fe1 commit 896fd3f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions datafusion/common/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@ pub enum DataFusionError {
JITError(ModuleError),
/// Error with additional context
Context(String, Box<DataFusionError>),
/// Errors originating from either mapping LogicalPlans to/from Substrait plans
/// or serializing/deserializing protobytes to Substrait plans
Substrait(String),
}

#[macro_export]
Expand Down Expand Up @@ -318,6 +321,9 @@ impl Display for DataFusionError {
DataFusionError::Context(ref desc, ref err) => {
write!(f, "{}\ncaused by\n{}", desc, *err)
}
DataFusionError::Substrait(ref desc) => {
write!(f, "Substrait error: {desc}")
}
}
}
}
Expand Down

0 comments on commit 896fd3f

Please sign in to comment.