Skip to content

Commit

Permalink
fix: udf get function name optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
taoran1250 committed Jan 8, 2025
1 parent 996f432 commit e7fb89d
Showing 1 changed file with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -321,15 +321,11 @@ public static List<String> extractScalaMethodNames(String scalaCode) {

public static List<String> extractPythonMethodNames(String udfPath) throws Exception {
String localPath = udfPath.replace(StorageUtils$.MODULE$.FILE_SCHEMA(), "");
String python3Path = Utils.exec(new String[] {"which", "python3"});
if (StringUtils.isBlank(python3Path)) {
throw new UdfException(80043, "python3 not found");
}
String exec =
Utils.exec(
(new String[] {
"sudo",
python3Path,
Constants.PYTHON_PATH.getValue(),
Configuration.getLinkisHome() + "/admin/" + "linkis_udf_get_python_methods.py",
localPath
}));
Expand Down

0 comments on commit e7fb89d

Please sign in to comment.