diff --git a/datafusion/core/src/datasource/file_format/parquet.rs b/datafusion/core/src/datasource/file_format/parquet.rs index 7bd2e188a0b0f..dbdf448646623 100644 --- a/datafusion/core/src/datasource/file_format/parquet.rs +++ b/datafusion/core/src/datasource/file_format/parquet.rs @@ -576,13 +576,11 @@ pub(crate) mod test_util { multi_page: bool, ) -> Result<(Vec, Vec)> { // Each batch writes to their own file - let mut idx = 0; let pathbuf = PathBuf::from_str("/tmp/").unwrap(); let files: Vec<_> = batches .into_iter() .map(|batch| { - idx += 1; - let mut output = NamedTempFile::new_in(pathbuf.join(format!("file{idx}"))).expect("creating temp file"); + let mut output = NamedTempFile::new_in(pathbuf.clone()).expect("creating temp file"); let builder = WriterProperties::builder(); let props = if multi_page {