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

test: get file size by func metadata #11575

Merged
merged 1 commit into from
Jul 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions datafusion/core/src/datasource/file_format/csv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1251,11 +1251,8 @@ mod tests {
"+-----------------------+",
"| 50 |",
"+-----------------------+"];
let file_size = if cfg!(target_os = "windows") {
30 // new line on Win is '\r\n'
} else {
20
};

let file_size = std::fs::metadata("tests/data/one_col.csv")?.len() as usize;
Copy link
Contributor

Choose a reason for hiding this comment

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

I wonder how this test is passing on CI? In theory we run these tests on CI:

https://github.com/apache/datafusion/actions/runs/10044145872/job/27758535504

but somehow this test does not appear to run 🤔

// A 20-Byte file at most get partitioned into 20 chunks
let expected_partitions = if n_partitions <= file_size {
n_partitions
Expand Down