You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by "MukjepScarlet (via GitHub)" <gi...@apache.org> on 2026/01/13 11:28:28 UTC

[I] JsonPath convert datetime/date error [seatunnel]

MukjepScarlet opened a new issue, #10333:
URL: https://github.com/apache/seatunnel/issues/10333

   https://github.com/apache/seatunnel/blob/c67c534b9aa8b08e8ca342fd91e382ee25d407fd/seatunnel-transforms-v2/src/main/java/org/apache/seatunnel/transform/jsonpath/JsonPathTransform.java#L162
   
   This breaks
   
   `JsonToRowConverters#convertToLocalDate(Time)`.


-- 
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: commits-unsubscribe@seatunnel.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [BUG] JsonPath convert datetime/date error [seatunnel]

Posted by "zhangshenghang (via GitHub)" <gi...@apache.org>.
zhangshenghang commented on issue #10333:
URL: https://github.com/apache/seatunnel/issues/10333#issuecomment-3754896938

   <!-- code-pr-reviewer -->
   Thanks for the report. I've verified the code paths you mentioned:
   
   **Evidence:**
   - `JsonPathTransform.java:162` passes `null` as `fieldName` to `converter.convert(jsonNode, null)`
   - `JsonToRowConverters.java:259-271` (`convertToLocalDate`) and `L278-293` (`convertToLocalDateTime`) use `fieldName` as the cache key for `DateTimeFormatter`
   - `JsonPathTransformTest.java` has no test coverage for `dest_type="date"` or `dest_type="timestamp"`
   
   **Likely issue:**
   The `null` fieldName breaks the formatter caching mechanism in `JsonToRowConverters`, causing repeated format matching on every conversion (performance degradation). There's also potential NPE risk depending on the Map implementation.
   
   **To proceed:**
   1. Can you share a reproduction config or error log?
   2. What is the actual failure mode—exception, incorrect result, or performance concern?
   3. Are you observing this with a specific date/timestamp format?


-- 
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: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [BUG] JsonPath convert datetime/date error [seatunnel]

Posted by "yht0827 (via GitHub)" <gi...@apache.org>.
yht0827 commented on issue #10333:
URL: https://github.com/apache/seatunnel/issues/10333#issuecomment-3784618061

   I'd like to work on this


-- 
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: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [BUG] JsonPath convert datetime/date error [seatunnel]

Posted by "MukjepScarlet (via GitHub)" <gi...@apache.org>.
MukjepScarlet commented on issue #10333:
URL: https://github.com/apache/seatunnel/issues/10333#issuecomment-3755238742

   `null` won't make HashMap (caching) error, instead, it makes the second row (LocalDate/LocalDateTime) to directly use the first one's cached formatter. This is the issue. Can be reproduced by two or more input rows with different datetime format.
   
   简单来说, `null` 不会让作为缓存的 `Map` 报错. 如果存在不止一列日期(+时间)并且适应不同的DateTimeFormatter, 就会出错. 现在的单测里没有覆盖这种情况.


-- 
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: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [BUG] JsonPath convert datetime/date error [seatunnel]

Posted by "MukjepScarlet (via GitHub)" <gi...@apache.org>.
MukjepScarlet commented on issue #10333:
URL: https://github.com/apache/seatunnel/issues/10333#issuecomment-3755240629

   `null` 替换为正确的列名即可解决这个问题


-- 
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: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [BUG] JsonPath convert datetime/date error [seatunnel]

Posted by "dybyte (via GitHub)" <gi...@apache.org>.
dybyte closed issue #10333: [BUG] JsonPath convert datetime/date error
URL: https://github.com/apache/seatunnel/issues/10333


-- 
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: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org