Skip to content

Commit a415265

Browse files
committed
Merge branch 'hotfix_1.10_4.0.x_31787' into '1.10_release_4.0.x'
[31787][rowdata]row npe See merge request dt-insight-engine/flinkStreamSQL!177
2 parents ea52aeb + 228c64b commit a415265

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

core/src/main/java/com/dtstack/flink/sql/util/RowDataConvert.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,9 @@ public static BaseRow convertToBaseRow(Row row) {
4545
int length = row.getArity();
4646
GenericRow genericRow = new GenericRow(length);
4747
for (int i = 0; i < length; i++) {
48-
if (row.getField(i) instanceof String) {
48+
if (row.getField(i) == null) {
49+
genericRow.setField(i, row.getField(i));
50+
} else if (row.getField(i) instanceof String) {
4951
genericRow.setField(i, BinaryString.fromString((String) row.getField(i)));
5052
} else if (row.getField(i) instanceof Timestamp) {
5153
SqlTimestamp newTimestamp = SqlTimestamp.fromTimestamp(((Timestamp) row.getField(i)));

0 commit comments

Comments
 (0)