Chen-Yuan-Lai commented on PR #15946:
URL: https://github.com/apache/datafusion/pull/15946#issuecomment-2862197349

   @comphead Thank you for your review. You're right - my current 
implementation doesn't preserve backtraces.
   
   To preserve backtraces, I think there are two options:
   1. **Add Context wrapping**: We could add backtrace by using Context
      ```rust
      let err = DataFusionError::External(Box::new($ERR))
          .context(format!("backtrace: {}", DataFusionError::get_back_trace()));
      ```
       However, this would create double wrapping and might affect error 
handling logic.
   
   2. **Modify `DataFusionError` enum definitions**: Change error variants to 
include backtrace fields
       ```rust
       External(GenericError, Option<String>),
       ExecutionJoin(JoinError, Option<String>),
       ```
       But this would need to change the usage of this error type in the 
codebase
   
   Do you think which approach is better, or would you recommend a different 
solution?
   


-- 
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: github-unsubscr...@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to