alamb commented on code in PR #26110:
URL: https://github.com/apache/datafusion/pull/26110#discussion_r4218798808
##########
datafusion/execution/src/disk_manager.rs:
##########
@@ -585,6 +586,32 @@ impl SpillFile for RefCountedTempFile {
}))
}
}
+
+/// Escape a string to be safe to use in a temp file name prefix.
+///
+/// All non-alphanumeric characters are replaced by `_` and characters are put
in lowercase.
+/// A `.tmp.` is added at the beginning and a last `.` is set at the end.
+///
+/// For example "This kind.of /input" becomes ".tmp.this_kind_of_input."
+fn escape_for_temp_file_name_prefix(text: &str) -> String {
Review Comment:
Do you think we should also potentially cap the length of text too? like to
20 characters?
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]