Tpt commented on code in PR #26110:
URL: https://github.com/apache/datafusion/pull/26110#discussion_r4218890044
##########
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:
Thank you! Definitely. 20 characters seems a bit small to me. Still quite
short descriptions like `sort_merge_join_buffered_spill` will be truncated.
What about something larger like 128 to avoid extremely long file names will
still keeping the full description in most case?
--
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]