kylebarron commented on code in PR #1000:
URL:
https://github.com/apache/datafusion-python/pull/1000#discussion_r1932699499
##########
src/config.rs:
##########
@@ -40,7 +42,7 @@ impl PyConfig {
#[staticmethod]
pub fn from_env() -> PyResult<Self> {
Review Comment:
Instead of always calling `map_err` to a `PyDataFusionError` and then
coercing to `PyResult`, you can just return a `PyDataFusionResult` (i.e.
`Result<T, PyDataFusionError>`). You just need to implement
`From<PyDataFusionError> for PyErr`.
https://github.com/developmentseed/obstore/blob/25f51361d8bf0634e8fe851b76d086ab0d23d0af/pyo3-object_store/src/error.rs#L102
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]