Skip to content

Commit

Permalink
size=None for http implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
Jay Chia committed Sep 22, 2023
1 parent 60eaaf3 commit 4db517b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/daft-io/src/http.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,9 @@ fn _get_file_metadata_from_html(path: &str, text: &str) -> super::Result<Vec<Fil
};
Ok(Some(FileMetadata {
filepath: absolute_path,
size: None, // TODO: fire HEAD requests to grab the content-length headers
// NOTE: This is consistent with fsspec behavior, but we may choose to HEAD the files to grab Content-Length
// for populating `size` if necessary
size: None,
filetype,
}))
})
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/io/test_list_files_http.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def test_gs_single_file_listing(nginx_http_url):
# fsspec_result = fs.ls(path, detail=True)

assert len(daft_ls_result) == 1
assert daft_ls_result[0] == {"path": path, "size": 24, "type": "File"}
assert daft_ls_result[0] == {"path": path, "size": None, "type": "File"}


@pytest.mark.integration()
Expand Down

0 comments on commit 4db517b

Please sign in to comment.