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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
