Skip to content

Commit 228c64b

Browse files
committed
[31787][rowdata]row npe
1 parent ea52aeb commit 228c64b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

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)