Skip to content

Commit

Permalink
[bugfix][lib][storage] Fix dateFormat is invalid when data type is ti…
Browse files Browse the repository at this point in the history
…mestamp

Fix #984
  • Loading branch information
wgzhao committed Dec 13, 2023
1 parent d165f76 commit 7844518
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
import com.wgzhao.addax.common.element.DateColumn;
import com.wgzhao.addax.common.element.LongColumn;
import com.wgzhao.addax.common.element.Record;
import com.wgzhao.addax.common.element.TimestampColumn;
import com.wgzhao.addax.common.exception.AddaxException;
import com.wgzhao.addax.common.plugin.RecordReceiver;
import com.wgzhao.addax.common.plugin.TaskPluginCollector;
Expand Down Expand Up @@ -309,7 +310,7 @@ public static List<String> recordToList(Record record, String nullFormat, DateFo
splitRows.add(nullFormat);
} else {
// warn: it's all ok if nullFormat is null
boolean isDateColumn = column instanceof DateColumn;
boolean isDateColumn = column instanceof DateColumn || column instanceof TimestampColumn;
if (!isDateColumn) {
splitRows.add(column.asString());
} else {
Expand Down

0 comments on commit 7844518

Please sign in to comment.