diff --git a/java/connector-node/risingwave-sink-es-7/src/main/java/com/risingwave/connector/EsSink.java b/java/connector-node/risingwave-sink-es-7/src/main/java/com/risingwave/connector/EsSink.java index f9c266f0af117..74f439364aed2 100644 --- a/java/connector-node/risingwave-sink-es-7/src/main/java/com/risingwave/connector/EsSink.java +++ b/java/connector-node/risingwave-sink-es-7/src/main/java/com/risingwave/connector/EsSink.java @@ -200,8 +200,11 @@ private Map buildDoc(SinkRow row) Object col = row.get(i); switch (type) { case DATE: + case TIME: + case TIMESTAMP: + case TIMESTAMPTZ: // es client doesn't natively support java.sql.Timestamp/Time/Date - // so we need to convert Date type into a string as suggested in + // so we need to convert Date/Time/Timestamp type into a string as suggested in // https://github.com/elastic/elasticsearch/issues/31377#issuecomment-398102292 col = col.toString(); break; @@ -214,7 +217,6 @@ private Map buildDoc(SinkRow row) default: break; } - if (col instanceof Date) {} doc.put(getTableSchema().getColumnDesc(i).getName(), col); }