[Bug](javaudf) fix BE crash if javaudf is push down (#21139)

This commit is contained in:
Gabriel
2023-06-28 15:01:24 +08:00
committed by GitHub
parent 1fc1e76fc7
commit a4fdf7324a
6 changed files with 177 additions and 141 deletions

View File

@ -140,8 +140,9 @@ Status UserFunctionCache::_load_entry_from_lib(const std::string& dir, const std
}
std::vector<std::string> split_parts = strings::Split(file, ".");
if (split_parts.size() != 3) {
return Status::InternalError("user function's name should be function_id.checksum.so");
if (split_parts.size() != 3 && split_parts.size() != 4) {
return Status::InternalError(
"user function's name should be function_id.checksum[.file_name].file_type");
}
int64_t function_id = std::stol(split_parts[0]);
std::string checksum = split_parts[1];
@ -176,7 +177,7 @@ Status UserFunctionCache::_load_cached_lib() {
auto st = _load_entry_from_lib(sub_dir, file.file_name);
if (!st.ok()) {
LOG(WARNING) << "load a library failed, dir=" << sub_dir
<< ", file=" << file.file_name;
<< ", file=" << file.file_name << ": " << st.to_string();
}
return true;
};