Skip to content

Commit ae5c773

Browse files
author
gituser
committed
Merge branch 'hotfix_1.8_3.10.x_28027' into 1.8_release_3.10.x
2 parents f6f950d + 606e77b commit ae5c773

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

flinkx-hdfs/flinkx-hdfs-writer/src/main/java/com/dtstack/flinkx/hdfs/writer/HdfsParquetOutputFormat.java

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff 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){

0 commit comments

Comments
 (0)