mirror of
https://gitee.com/dolphinscheduler/DolphinScheduler.git
synced 2024-11-30 03:08:01 +08:00
[improve-#13665] improve datax parser if sql contain * (#13680)
* [improve-#13665] improve datax parser if sql contain * * Update dolphinscheduler-task-plugin/dolphinscheduler-task-datax/src/main/java/org/apache/dolphinscheduler/plugin/task/datax/DataxTask.java Co-authored-by: fuchanghai <‘2875334588@qq.com’> Co-authored-by: Aaron Wang <wangweirao16@gmail.com>
This commit is contained in:
parent
35d8e8ac17
commit
6218f818c0
@ -90,6 +90,11 @@ public class DataxTask extends AbstractTask {
|
||||
*/
|
||||
private static final String DATAX_PYTHON = "python2.7";
|
||||
private static final Pattern PYTHON_PATH_PATTERN = Pattern.compile("/bin/python[\\d.]*$");
|
||||
|
||||
/**
|
||||
* select all
|
||||
*/
|
||||
private static final String SELECT_ALL_CHARACTER = "*";
|
||||
/**
|
||||
* datax path
|
||||
*/
|
||||
@ -538,6 +543,11 @@ public class DataxTask extends AbstractTask {
|
||||
String.format("grammatical analysis sql column [ %s ] failed", item));
|
||||
}
|
||||
|
||||
if (SELECT_ALL_CHARACTER.equals(item.toString())) {
|
||||
log.info("sql contains *, grammatical analysis failed");
|
||||
return new String[0];
|
||||
}
|
||||
|
||||
if (columnName == null) {
|
||||
throw new RuntimeException(
|
||||
String.format("grammatical analysis sql column [ %s ] failed", item));
|
||||
|
Loading…
Reference in New Issue
Block a user