File tree Expand file tree Collapse file tree 1 file changed +7
-11
lines changed
Expand file tree Collapse file tree 1 file changed +7
-11
lines changed Original file line number Diff line number Diff line change @@ -112,19 +112,15 @@ UserFunctionCacheEntry::~UserFunctionCacheEntry() {
112112
113113 // delete library file if should_delete_library is set
114114 if (should_delete_library.load ()) {
115+ WARN_IF_ERROR (
116+ io::global_local_filesystem ()->delete_directory_or_file (lib_file),
117+ " failed to delete unzipped directory of python udf library, lib_file=" + lib_file);
118+
115119 if (type == LibType::PY_ZIP) {
116120 // For Python UDF, we need to delete both the unzipped directory and the original zip file.
117- auto st = io::global_local_filesystem ()->delete_directory_or_file (lib_file);
118-
119- st = io::global_local_filesystem ()->delete_file (lib_file + " .zip" );
120-
121- if (!st.ok ()) [[unlikely]] {
122- LOG (WARNING) << " failed to delete python udf files, lib_file=" << lib_file << " : "
123- << st.to_string ();
124- }
125-
126- } else {
127- unlink (lib_file.c_str ());
121+ std::string zip_file = lib_file + " .zip" ;
122+ WARN_IF_ERROR (io::global_local_filesystem ()->delete_directory_or_file (zip_file),
123+ " failed to delete zip file of python udf library, lib_file=" + zip_file);
128124 }
129125 }
130126}
You can’t perform that action at this time.
0 commit comments