yzeng1618 commented on code in PR #10135:
URL: https://github.com/apache/seatunnel/pull/10135#discussion_r2587338388
##########
seatunnel-connectors-v2/connector-elasticsearch/src/main/java/org/apache/seatunnel/connectors/seatunnel/elasticsearch/serialize/ElasticsearchRowSerializer.java:
##########
@@ -203,6 +212,12 @@ private Map<String, Object> toDocumentMap(SeaTunnelRow
row, SeaTunnelRowType row
private Object convertValue(String fieldName, Object value) {
if (value instanceof Temporal) {
// jackson not support jdk8 new time api
+ if (value instanceof LocalDateTime) {
+ // Use ISO 8601 format compatible with Elasticsearch's
strict_date_optional_time
+ return ((LocalDateTime)
value).format(LOCAL_DATE_TIME_FORMATTER);
+ } else if (value instanceof LocalDate) {
Review Comment:
Thank you very much for your suggestion; the corresponding function has been
optimized.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]