-
Notifications
You must be signed in to change notification settings - Fork 127
Open
Description
English:
I find that there is a problem with the return value of this method under this class. When the version of [apache.links.version] is 1.1.2, an error will be reported here. You should comment out [_2] and modify it as follows:
` // Apache Linkis variable CustomVariableUtils
private static String linkisVariabelReplace(String sql, String username) {
JobRequest jobRequest = new JobRequest();
jobRequest.setExecutionCode(sql);
jobRequest.setExecuteUser(username);
CodeLanguageLabel codeLabel = new CodeLanguageLabel();
codeLabel.setCodeType("sql");
Map<String, Object> configMap = new HashMap<>();
jobRequest.setParams(configMap);
jobRequest.setLabels(Arrays.asList(codeLabel));
//return CustomVariableUtils.replaceCustomVar(jobRequest, "sql")._2; //Before modification
return CustomVariableUtils.replaceCustomVar(jobRequest, "sql"); //After modification
}`
Chinese:
我发现在这个类下,这个方法返回值有问题,当[apache.linkis.version]版本是1.1.2时,这里会报错,应该注释掉 [_2],修改如下:
` // Apache Linkis variable CustomVariableUtils
private static String linkisVariabelReplace(String sql, String username) {
JobRequest jobRequest = new JobRequest();
jobRequest.setExecutionCode(sql);
jobRequest.setExecuteUser(username);
CodeLanguageLabel codeLabel = new CodeLanguageLabel();
codeLabel.setCodeType("sql");
Map<String, Object> configMap = new HashMap<>();
jobRequest.setParams(configMap);
jobRequest.setLabels(Arrays.asList(codeLabel));
//return CustomVariableUtils.replaceCustomVar(jobRequest, "sql")._2; //修改前
return CustomVariableUtils.replaceCustomVar(jobRequest, "sql"); //修改后
}`
Metadata
Metadata
Assignees
Labels
No labels