Skip to content

Commit

Permalink
test: get file size by func metadata (#11575)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhuliquan authored Jul 23, 2024
1 parent f9ee64a commit 5f0ab31
Showing 1 changed file with 2 additions and 5 deletions.
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 @@ -1301,11 +1301,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;
// A 20-Byte file at most get partitioned into 20 chunks
let expected_partitions = if n_partitions <= file_size {
n_partitions
Expand Down

0 comments on commit 5f0ab31

Please sign in to comment.