Skip to content

refactor: Add new PlPath that abstracts over URI and PathBuf #23062

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 11 commits into from

Conversation

coastalwhite
Copy link
Collaborator

No description provided.

@github-actions github-actions bot added internal An internal refactor or improvement python Related to Python Polars rust Related to Rust Polars labels Jun 3, 2025
@nameexhaustion
Copy link
Collaborator

nameexhaustion commented Jun 4, 2025

I am not sure about calling it Address, this to me gives the feeling of referring to a network server rather than the location of a file / folder. Could we maybe call it enum PlPath / struct PlCloudPath instead?

@coastalwhite coastalwhite changed the title refactor: Add new Address that abstracts over URI and PathBuf refactor: Add new PlPath that abstracts over URI and PathBuf Jun 4, 2025
@coastalwhite coastalwhite force-pushed the refactor/address branch 2 times, most recently from 4bf0c35 to 7ae9687 Compare June 4, 2025 12:21
self.uri
}

pub fn offset_path(&self) -> &str {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: maybe call it strip_scheme()?

@nameexhaustion
Copy link
Collaborator

Could we directly use &PlPath / &PlCloudPath instead of a separate Ref type?

@coastalwhite
Copy link
Collaborator Author

Could we directly use &PlPath / &PlCloudPath instead of a separate Ref type?

This would mean you require cloning str into Box<str> always. But might not be that much of a problem, honestly.

Copy link

codecov bot commented Jun 6, 2025

Codecov Report

Attention: Patch coverage is 69.39444% with 187 lines in your changes missing coverage. Please review.

Project coverage is 80.13%. Comparing base (8387bab) to head (d82a4ee).
Report is 50 commits behind head on main.

Files with missing lines Patch % Lines
crates/polars-utils/src/plpath.rs 67.35% 63 Missing ⚠️
...ates/polars-pipe/src/executors/sinks/output/csv.rs 0.00% 19 Missing ⚠️
crates/polars-io/src/partition.rs 0.00% 18 Missing ⚠️
.../polars-pipe/src/executors/sinks/output/parquet.rs 0.00% 10 Missing ⚠️
crates/polars-io/src/utils/file.rs 81.39% 8 Missing ⚠️
crates/polars-io/src/utils/mkdir.rs 57.14% 6 Missing ⚠️
...ates/polars-pipe/src/executors/sinks/output/ipc.rs 0.00% 6 Missing ⚠️
crates/polars-plan/src/plans/functions/count.rs 40.00% 6 Missing ⚠️
...ates/polars-plan/src/plans/optimizer/count_star.rs 0.00% 6 Missing ⚠️
crates/polars-io/src/path_utils/hugging_face.rs 0.00% 5 Missing ⚠️
... and 24 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #23062      +/-   ##
==========================================
- Coverage   80.23%   80.13%   -0.11%     
==========================================
  Files        1684     1685       +1     
  Lines      223938   224143     +205     
  Branches     2809     2809              
==========================================
- Hits       179677   179614      -63     
- Misses      43601    43869     +268     
  Partials      660      660              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
internal An internal refactor or improvement python Related to Python Polars rust Related to Rust Polars
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants