File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed
flinkx-hdfs/flinkx-hdfs-writer/src/main/java/com/dtstack/flinkx/hdfs/writer Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -152,12 +152,15 @@ public void writeSingleRecordToFile(Row row) throws WriteRecordException {
152152 int i = 0 ;
153153 try {
154154 for (; i < fullColumnNames .size (); i ++) {
155- Object valObj = row .getField (colIndices [i ]);
156- if (valObj == null || valObj .toString ().length () == 0 ){
157- continue ;
158- }
155+ int colIndex = colIndices [i ];
156+ if (colIndex > -1 ){
157+ Object valObj = row .getField (colIndex );
158+ if (valObj == null || valObj .toString ().length () == 0 ){
159+ continue ;
160+ }
159161
160- addDataToGroup (group , valObj , i );
162+ addDataToGroup (group , valObj , i );
163+ }
161164 }
162165 } catch (Exception e ){
163166 if (e instanceof WriteRecordException ){
You can’t perform that action at this time.
0 commit comments