alamb commented on a change in pull request #1680:
URL: https://github.com/apache/arrow-datafusion/pull/1680#discussion_r792144273
##########
File path: datafusion/src/execution/disk_manager.rs
##########
@@ -120,34 +116,15 @@ fn create_local_dirs(local_dirs: Vec<PathBuf>) ->
Result<Vec<TempDir>> {
.collect()
}
-fn get_file(file_name: &str, local_dirs: &[TempDir]) -> String {
- let mut hasher = DefaultHasher::new();
- file_name.hash(&mut hasher);
- let hash = hasher.finish();
- let dir = &local_dirs[hash.rem_euclid(local_dirs.len() as u64) as usize];
- let mut path = PathBuf::new();
- path.push(dir);
- path.push(file_name);
- path.to_str().unwrap().to_string()
-}
+fn create_tmp_file(local_dirs: &[TempDir]) -> Result<NamedTempFile> {
Review comment:
tempfiles are now generated using `tempfile` rather than string
manipulation
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]