Skip to content

Commit da8725b

Browse files
authored
Merge fee5d1a into 65a7c7f
2 parents 65a7c7f + fee5d1a commit da8725b

File tree

18 files changed

+319
-238
lines changed

18 files changed

+319
-238
lines changed

dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/DqRuleServiceImpl.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ private InputParam getTextareaParam(DqRuleInputEntry inputEntry) {
260260
.setRequired(inputEntry.getIsValidate())
261261
.build())
262262
.setProps(paramProps)
263-
.setValue(inputEntry.getValue())
263+
.setValue(inputEntry.getData())
264264
.setPlaceholder(inputEntry.getPlaceholder())
265265
.setEmit(Boolean.TRUE.equals(inputEntry.getIsEmit()) ? Collections.singletonList(CHANGE) : null)
266266
.build();
@@ -302,7 +302,7 @@ private SelectParam getSelectParam(DqRuleInputEntry inputEntry) {
302302
return SelectParam
303303
.newBuilder(inputEntry.getField(), inputEntry.getTitle())
304304
.setOptions(options)
305-
.setValue(inputEntry.getValue())
305+
.setValue(inputEntry.getData())
306306
.setSize(SMALL)
307307
.setPlaceHolder(inputEntry.getPlaceholder())
308308
.setEmit(Boolean.TRUE.equals(inputEntry.getIsEmit()) ? Collections.singletonList(CHANGE) : null)
@@ -322,7 +322,7 @@ private InputParam getInputParam(DqRuleInputEntry inputEntry) {
322322
.setRequired(inputEntry.getIsValidate())
323323
.build())
324324
.setProps(paramProps)
325-
.setValue(inputEntry.getValue())
325+
.setValue(inputEntry.getData())
326326
.setPlaceholder(inputEntry.getPlaceholder())
327327
.setEmit(Boolean.TRUE.equals(inputEntry.getIsEmit()) ? Collections.singletonList(CHANGE) : null)
328328
.build();

dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/DqRuleServiceTest.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,11 @@
4040
import org.apache.dolphinscheduler.dao.mapper.DqRuleExecuteSqlMapper;
4141
import org.apache.dolphinscheduler.dao.mapper.DqRuleInputEntryMapper;
4242
import org.apache.dolphinscheduler.dao.mapper.DqRuleMapper;
43+
import org.apache.dolphinscheduler.plugin.task.api.enums.dp.DataType;
4344
import org.apache.dolphinscheduler.plugin.task.api.enums.dp.ExecuteSqlType;
4445
import org.apache.dolphinscheduler.plugin.task.api.enums.dp.InputType;
4546
import org.apache.dolphinscheduler.plugin.task.api.enums.dp.OptionSourceType;
4647
import org.apache.dolphinscheduler.plugin.task.api.enums.dp.RuleType;
47-
import org.apache.dolphinscheduler.plugin.task.api.enums.dp.ValueType;
4848
import org.apache.dolphinscheduler.spi.enums.DbType;
4949
import org.apache.dolphinscheduler.spi.params.base.FormType;
5050

@@ -198,13 +198,13 @@ private List<DqRuleInputEntry> getRuleInputEntryList() {
198198
srcConnectorType.setType(FormType.SELECT.getFormType());
199199
srcConnectorType.setCanEdit(true);
200200
srcConnectorType.setIsShow(true);
201-
srcConnectorType.setValue("JDBC");
201+
srcConnectorType.setData("JDBC");
202202
srcConnectorType.setPlaceholder("Please select the source connector type");
203203
srcConnectorType.setOptionSourceType(OptionSourceType.DEFAULT.getCode());
204204
srcConnectorType
205205
.setOptions("[{\"label\":\"HIVE\",\"value\":\"HIVE\"},{\"label\":\"JDBC\",\"value\":\"JDBC\"}]");
206206
srcConnectorType.setInputType(InputType.DEFAULT.getCode());
207-
srcConnectorType.setValueType(ValueType.NUMBER.getCode());
207+
srcConnectorType.setDataType(DataType.NUMBER.getCode());
208208
srcConnectorType.setIsEmit(true);
209209
srcConnectorType.setIsValidate(true);
210210

@@ -217,7 +217,7 @@ private List<DqRuleInputEntry> getRuleInputEntryList() {
217217
statisticsName.setPlaceholder("Please enter statistics name, the alias in statistics execute sql");
218218
statisticsName.setOptionSourceType(OptionSourceType.DEFAULT.getCode());
219219
statisticsName.setInputType(InputType.DEFAULT.getCode());
220-
statisticsName.setValueType(ValueType.STRING.getCode());
220+
statisticsName.setDataType(DataType.STRING.getCode());
221221
statisticsName.setIsEmit(false);
222222
statisticsName.setIsValidate(true);
223223

@@ -229,7 +229,7 @@ private List<DqRuleInputEntry> getRuleInputEntryList() {
229229
statisticsExecuteSql.setIsShow(true);
230230
statisticsExecuteSql.setPlaceholder("Please enter the statistics execute sql");
231231
statisticsExecuteSql.setOptionSourceType(OptionSourceType.DEFAULT.getCode());
232-
statisticsExecuteSql.setValueType(ValueType.LIKE_SQL.getCode());
232+
statisticsExecuteSql.setDataType(DataType.LIKE_SQL.getCode());
233233
statisticsExecuteSql.setIsEmit(false);
234234
statisticsExecuteSql.setIsValidate(true);
235235

dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/DqRuleInputEntry.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@
1717

1818
package org.apache.dolphinscheduler.dao.entity;
1919

20+
import org.apache.dolphinscheduler.plugin.task.api.enums.dp.DataType;
2021
import org.apache.dolphinscheduler.plugin.task.api.enums.dp.InputType;
2122
import org.apache.dolphinscheduler.plugin.task.api.enums.dp.OptionSourceType;
22-
import org.apache.dolphinscheduler.plugin.task.api.enums.dp.ValueType;
2323

2424
import java.io.Serializable;
2525
import java.util.Date;
@@ -56,10 +56,10 @@ public class DqRuleInputEntry implements Serializable {
5656
@TableField(value = "title")
5757
private String title;
5858
/**
59-
* default value,can be null
59+
* default data,can be null
6060
*/
61-
@TableField(value = "value")
62-
private String value;
61+
@TableField(value = "data")
62+
private String data;
6363
/**
6464
* default options,can be null
6565
* [{label:"",value:""}]
@@ -79,8 +79,8 @@ public class DqRuleInputEntry implements Serializable {
7979
/**
8080
* input entry type: string,array,number .etc
8181
*/
82-
@TableField(value = "value_type")
83-
private int valueType = ValueType.NUMBER.getCode();
82+
@TableField(value = "data_type")
83+
private int dataType = DataType.NUMBER.getCode();
8484
/**
8585
* input entry type: default,statistics,comparison
8686
*/

dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/utils/DqRuleUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public static List<DqRuleInputEntry> transformInputEntry(List<DqRuleInputEntry>
4040

4141
if (valuesMap.get(dqRuleInputEntry.getField()) != null) {
4242
String value = String.valueOf(valuesMap.get(dqRuleInputEntry.getField()));
43-
dqRuleInputEntry.setValue(value);
43+
dqRuleInputEntry.setData(value);
4444
}
4545

4646
if (valuesMap.get("is_show") != null) {

dolphinscheduler-dao/src/main/resources/org/apache/dolphinscheduler/dao/mapper/DqRuleInputEntryMapper.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@
2424
a.field,
2525
a.type,
2626
a.title,
27-
a.`value`,
27+
a.data,
2828
a.options,
2929
a.placeholder,
3030
a.option_source_type,
31-
a.value_type,
31+
a.data_type,
3232
a.input_type,
3333
a.is_show,
3434
a.can_edit,

0 commit comments

Comments
 (0)