Skip to content

Commit

Permalink
feat: Parse UDF function name interface submission
Browse files Browse the repository at this point in the history
  • Loading branch information
taoran1250 committed Dec 25, 2024
1 parent a71e674 commit d10e4aa
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1440,14 +1440,14 @@ public Message pythonUpload(
}

@ApiImplicitParam(
name = "path",
dataType = "String",
value = "path",
example = "file:///test-dir/test-sub-dir/test1012_01.py")
name = "path",
dataType = "String",
value = "path",
example = "file:///test-dir/test-sub-dir/test1012_01.py")
@RequestMapping(path = "/get-register-functions", method = RequestMethod.GET)
public Message getRegisterFunctions(HttpServletRequest req, @RequestParam("path") String path) {
if (StringUtils.endsWithIgnoreCase(path, Constants.FILE_EXTENSION_PY)
|| StringUtils.endsWithIgnoreCase(path, Constants.FILE_EXTENSION_SCALA)) {
|| StringUtils.endsWithIgnoreCase(path, Constants.FILE_EXTENSION_SCALA)) {
if (StringUtils.startsWithIgnoreCase(path, StorageUtils$.MODULE$.FILE_SCHEMA())) {
try {
// 获取登录用户
Expand All @@ -1459,7 +1459,7 @@ public Message getRegisterFunctions(HttpServletRequest req, @RequestParam("path"
fileSystem.init(null);
if (fileSystem.canRead(fsPath)) {
return Message.ok()
.data("functions", UdfUtils.getRegisterFunctions(fileSystem, fsPath, path));
.data("functions", UdfUtils.getRegisterFunctions(fileSystem, fsPath, path));
} else {
return Message.error("您没有权限访问该文件");
}
Expand Down

0 comments on commit d10e4aa

Please sign in to comment.