matthewmturner commented on a change in pull request #1541:
URL: https://github.com/apache/arrow-datafusion/pull/1541#discussion_r783395275
##########
File path: datafusion/src/error.rs
##########
@@ -101,6 +104,12 @@ impl From<ParserError> for DataFusionError {
}
}
+impl From<Box<dyn Error + Send + Sync>> for DataFusionError {
+ fn from(err: Box<dyn Error + Send + Sync>) -> Self {
+ DataFusionError::External(err)
+ }
+}
+
Review comment:
Ah - thank you for the clarification. I can try that. So all of these
sites would now have External errors.
I'm wondering if there would be value in having a macro or function that
could downcast the trait object to concrete datafusionerrors (kind of like what
we do with compute kernels to downcast to concrete array types) - so we could
really use external for true external code.
Maybe that's a next step though. Just thinking out loud.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]