You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "michal-swiatowy (via GitHub)" <gi...@apache.org> on 2026/09/11 10:55:54 UTC

[PR] KAFKA-10561: Preserve sub-millisecond precision in TimestampConverter [kafka]

michal-swiatowy opened a new pull request, #23432:
URL: https://github.com/apache/kafka/pull/23432

   **Main idea**
   Replace `java.util.Date` (millisecond precision) with `java.time.Instant` (nanosecond precision) as the internal representation in `TimestampConverter`. This fixes loss of microsecond and nanosecond data when converting between unix and string timestamp formats.
   
   To do this a new `format.type` configuration option is added that selects the string parsing/formatting engine:
   - SimpleDateFormat (default) - for backward compatibility,
   - DateTimeFormatter - uses `java.time.format.DateTimeFormatter`
   
   **Key invariants**
   - Default behavior is unchanged - SimpleDateFormat remains the default `format.type`
   - Conversions involving Date, Time, or Timestamp Connect logical types still go through java.util.Date at the boundary and remain limited to millisecond precision (this is a Connect API constraint).
   - Using only JDK java.time classes.
   
   **Testing**
   - Added new tests for data format support and various convert cases
   - Full connect:transforms test suite ran ok


-- 
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: jira-unsubscribe@kafka.apache.org

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


Re: [PR] KAFKA-10561: Preserve sub-millisecond precision in TimestampConverter [kafka]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #23432:
URL: https://github.com/apache/kafka/pull/23432#issuecomment-5738947160

   A label of 'needs-attention' was automatically added to this PR in order to raise the
   attention of the committers. Once this issue has been triaged, the `triage` label
   should be removed to prevent this automation from happening again.


-- 
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: jira-unsubscribe@kafka.apache.org

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