You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by GitBox <gi...@apache.org> on 2022/05/24 02:12:32 UTC

[GitHub] [dolphinscheduler] luoyedeyi commented on a diff in pull request #10170: [Improvement][task sql] Improve creating function query

luoyedeyi commented on code in PR #10170:
URL: https://github.com/apache/dolphinscheduler/pull/10170#discussion_r879996536


##########
dolphinscheduler-task-plugin/dolphinscheduler-task-sql/src/main/java/org/apache/dolphinscheduler/plugin/task/sql/SqlTask.java:
##########
@@ -83,7 +83,7 @@ public class SqlTask extends AbstractTaskExecutor {
     /**
      * create function format
      */
-    private static final String CREATE_FUNCTION_FORMAT = "create temporary function {0} as ''{1}''";
+    private static final String CREATE_OR_REPLACE_FUNCTION_FORMAT = "create or replace temporary function {0} as ''{1}''";

Review Comment:
   I believe the temp function could be reused, if we set the value (kyuubi.engine.share.level) to user in Kyuubi. In this case, there is a long running Spark session and all tasks for same user are going to same Spark session. It's more likely to cause sql tasks with UDF to fail, if we only create function.



-- 
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: commits-unsubscribe@dolphinscheduler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org