| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
Publicly re-export curated error helpers, including to_datafusion_err, from the crate root. Add a regression test in crates/util/tests/root_exports.rs to ensure correct functionality in an integration-test context.
Make only to_datafusion_err publicly re-exported from the crate root. Keep PyDataFusionError and PyDataFusionResult as private imports for internal use, enhancing encapsulation and reducing exposure of non-essential components.
There was a problem hiding this comment.
I recommend removing that test. I don't think it adds a lot of value.
Sorry, something went wrong.
| use datafusion_python_util::to_datafusion_err; | ||
|
|
||
| #[test] | ||
| fn exports_to_datafusion_err_from_crate_root() { | ||
| let _ = to_datafusion_err("importable from crate root"); | ||
| } |
There was a problem hiding this comment.
This feels unnecessary.
Sorry, something went wrong.
There was a problem hiding this comment.
Sorry, something went wrong.
|
@timsaucer |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Which issue does this PR close?
Rationale for this change
Users currently cannot import to_datafusion_err directly from datafusion_python_util, even though the function is already public in errors.rs. This creates an inconsistency between the function’s visibility and how consumers expect to access it from the crate root.
This change fixes that mismatch by re-exporting to_datafusion_err from lib.rs, making the crate’s public API behave as expected and resolving the private item import error reported in the issue.
What changes are included in this PR?
This PR makes a small public API cleanup in the util crate:
Are these changes tested?
Yes.
This PR adds a regression test, exports_to_datafusion_err_from_crate_root, which imports to_datafusion_err from datafusion_python_util and verifies that the symbol is available from the crate root. This helps prevent future regressions in the crate’s public exports.
Are there any user-facing changes?
Yes.
to_datafusion_err is now importable directly from the datafusion_python_util crate root:
This is a small user-facing API 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.