kosiew opened a new pull request, #1487:
URL: https://github.com/apache/datafusion-python/pull/1487
## Which issue does this PR close?
* Closes #1431.
## Rationale for this change
Users currently cannot import `to_datafusion_err` from the
`datafusion_python_util` crate root even though the function is public in
`errors.rs`. This creates an inconsistency between the function’s visibility
and how consumers expect to access commonly used utilities from the crate root.
This change resolves that mismatch by re-exporting `to_datafusion_err` from
`lib.rs`, making the crate’s public API clearer and more ergonomic.
## What changes are included in this PR?
This PR makes the following updates:
* Re-exports `to_datafusion_err` from the `datafusion_python_util` crate
root via `pub use` in `lib.rs`
* Re-exports the related error items together from the same location for
consistency:
* `PyDataFusionError`
* `PyDataFusionResult`
* `py_datafusion_err`
* `to_datafusion_err`
* Adds a regression test (`crates/util/tests/root_exports.rs`) to verify
that `to_datafusion_err` can be imported from the crate root
## Are these changes tested?
Yes.
This PR adds a test that imports `to_datafusion_err` from
`datafusion_python_util` and exercises that import path successfully. This
helps prevent accidental regressions in the crate’s public exports.
## Are there any user-facing changes?
Yes.
`to_datafusion_err` can now be imported directly from the
`datafusion_python_util` crate root:
```rust
use datafusion_python_util::to_datafusion_err;
```
This is a small public API usability improvement, but it is not a breaking
change.
## LLM-generated code disclosure
This PR includes code, comments generated with assistance from LLM. All
LLM-generated content has been manually reviewed and tested.
--
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]