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/07/12 02:28:21 UTC

[GitHub] [dolphinscheduler] huangchenguang123 commented on a diff in pull request #10821: [fix][plugin]: fix spark sql use custom parma.

huangchenguang123 commented on code in PR #10821:
URL: https://github.com/apache/dolphinscheduler/pull/10821#discussion_r918492584


##########
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java:
##########
@@ -1300,6 +1301,10 @@ public void getPreVarPool(TaskInstance taskInstance, Set<String> preTask) {
             }
             if (allProperty.size() > 0) {
                 taskInstance.setVarPool(JSONUtils.toJsonString(allProperty.values()));
+                Map<String, Object> taskParams = JSONUtils.parseObject(taskInstance.getTaskParams(), new TypeReference<Map<String, Object>>() {
+                });
+                taskParams.put("varPool", JSONUtils.toJsonString(allProperty.values()));

Review Comment:
   org.apache.dolphinscheduler.service.expand.CuringGlobalParams#paramParsingPreparation use taskInstance.varParams to build prepareParamsMap, and prepareParamsMap  was used to replace sql param.But taskInstance.varParams is always null, so I put it.This is why I did it, maybe you have a better idea?



-- 
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