Skip to content
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

[FEAT] Add local native filesystem globbing. #1449

Merged
merged 6 commits into from
Sep 28, 2023
Merged

Conversation

clarkzinzow
Copy link
Contributor

@clarkzinzow clarkzinzow commented Sep 26, 2023

This PR adds an ls implementation for the native local filesystem.

Closes #1441

@github-actions github-actions bot added the enhancement New feature or request label Sep 26, 2023
src/daft-io/src/local.rs Outdated Show resolved Hide resolved
path: path.to_string_lossy(),
const LOCAL_PROTOCOL: &str = "file://";
let path = uri.strip_prefix(LOCAL_PROTOCOL).unwrap_or(uri);
let meta = tokio::fs::metadata(path)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changed to top-level tokio::fs::metadata() which (1) will follow symlinks, and (2) I believe has less overhead than opening + fetching the metadata off of the file object.

@codecov
Copy link

codecov bot commented Sep 27, 2023

Codecov Report

Merging #1449 (46e1254) into main (558b31e) will increase coverage by 0.01%.
The diff coverage is n/a.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1449      +/-   ##
==========================================
+ Coverage   74.61%   74.62%   +0.01%     
==========================================
  Files          60       60              
  Lines        6034     6034              
==========================================
+ Hits         4502     4503       +1     
+ Misses       1532     1531       -1     

see 1 file with indirect coverage changes

src/daft-io/src/local.rs Outdated Show resolved Hide resolved
src/daft-io/src/object_io.rs Outdated Show resolved Hide resolved
@samster25
Copy link
Member

@clarkzinzow Can we also add some python tests and ensure we have the same behavior as s3 and gcs?

src/daft-io/src/local.rs Outdated Show resolved Hide resolved
src/daft-io/src/local.rs Outdated Show resolved Hide resolved
src/daft-io/src/local.rs Outdated Show resolved Hide resolved
@clarkzinzow clarkzinzow merged commit 32fd4f6 into main Sep 28, 2023
24 checks passed
@clarkzinzow clarkzinzow deleted the clark/local-native-ls branch September 28, 2023 19:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Native filesystem globbing - Local
2 participants