deanwong commented on a change in pull request #4372:
URL: 
https://github.com/apache/incubator-dolphinscheduler/pull/4372#discussion_r553095024



##########
File path: 
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/ParameterUtils.java
##########
@@ -149,6 +149,33 @@ public static void setInParameter(int index, 
PreparedStatement stmt, DataType da
         }
     }
 
+    /**
+     * curing user define parameters
+     *
+     * @param globalParamMap  global param map
+     * @param globalParamList global param list
+     * @param commandType     command type
+     * @param scheduleTime    schedule time
+     * @param startParams     start param map
+     * @return curing user define parameters
+     */
+    public static String curingGlobalParams(Map<String, String> 
globalParamMap, List<Property> globalParamList,
+                                            CommandType commandType, Date 
scheduleTime, Map<String, String> startParams) {
+        String globalParamsJson = curingGlobalParams(globalParamMap, 
globalParamList, commandType, scheduleTime);
+        // merge start params
+        if (startParams != null && startParams.size() > 0) {

Review comment:
       I've got your point, user may pass 
{'biz_date','$[add_months(yyyyMMdd,12*N)]'} to process instance, so the 
$[add_months(yyyyMMdd,12*N)] should be replaced before merging into intance 
global params. I will figure out the solution.  I did not know the feature of 
'time custom parameter' yesterday, sorry for that.  




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to