Skip to content

Commit 501db8f

Browse files
committed
fix
1 parent b40d4d7 commit 501db8f

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

flink-doris-connector/src/main/java/org/apache/doris/flink/table/DorisDynamicOutputFormat.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -249,9 +249,8 @@ private void addBatch(T row) {
249249
StringJoiner value = new StringJoiner(this.fieldDelimiter);
250250
for (int i = 0; i < rowData.getArity() && i < fieldGetters.length; ++i) {
251251
Object field = fieldGetters[i].getFieldOrNull(rowData);
252-
LogicalType logicalType = logicalTypes[i];
253252
// Compatible date types
254-
if(LogicalTypeRoot.DATE.equals(logicalType.getTypeRoot())) {
253+
if(field != null && LogicalTypeRoot.DATE.equals(logicalTypes[i].getTypeRoot())) {
255254
field = Date.valueOf(LocalDate.ofEpochDay((int) field));
256255
}
257256
if (jsonFormat) {

0 commit comments

Comments
 (0)