Skip to content

Commit a29c06c

Browse files
committed
fix mysql async side fill data exception(IndexOutOfBoundsException)
1 parent 90b9890 commit a29c06c

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

core/src/main/java/com/dtstack/flink/sql/Main.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,9 @@ public static void main(String[] args) throws Exception {
109109
options.addOption("confProp", true, "env properties");
110110
options.addOption("mode", true, "deploy mode");
111111

112+
options.addOption("savePointPath", true, "Savepoint restore path");
113+
options.addOption("allowNonRestoredState", true, "Flag indicating whether non restored state is allowed if the savepoint");
114+
112115
CommandLineParser parser = new DefaultParser();
113116
CommandLine cl = parser.parse(options, args);
114117
String sql = cl.getOptionValue("sql");

launcher/src/main/java/com/dtstack/flink/sql/launcher/LauncherOptionParser.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,11 @@ public List<String> getProgramExeArgList() throws Exception {
155155
|| OPTION_YARN_CONF_DIR.equalsIgnoreCase(key)){
156156
continue;
157157
}
158+
159+
if(one.getValue() == null){
160+
continue;
161+
}
162+
158163
args.add("-" + key);
159164
args.add(one.getValue().toString());
160165
}

mysql/mysql-side/mysql-async-side/src/main/java/com/dtstack/flink/sql/side/mysql/MysqlAsyncReqRow.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ public Row fillData(Row input, Object line){
191191
row.setField(entry.getKey(), obj);
192192
}
193193

194-
for(Map.Entry<Integer, Integer> entry : sideInfo.getInFieldIndex().entrySet()){
194+
for(Map.Entry<Integer, Integer> entry : sideInfo.getSideFieldIndex().entrySet()){
195195
if(jsonArray == null){
196196
row.setField(entry.getKey(), null);
197197
}else{

0 commit comments

Comments
 (0)