kafka-connect-storage-common icon indicating copy to clipboard operation
kafka-connect-storage-common copied to clipboard

Added int64 customer formatter

Open kerdosa opened this issue 4 years ago • 1 comments

Problem

The avro int64 type with logicalType timestamp-millis becomes Date class in Java. Current FieldPartitioner cast it to Number class which throws exception.

Solution

If int64 type is Date object, use the SimpleDateFormat to convert the Date to string.

Related Issues

[ch124048]

Does this solution apply anywhere else?
  • [ ] yes
  • [ ] no
If yes, where?

Test Strategy

Testing done:
  • [ ] Unit tests
  • [ ] Integration tests
  • [ ] System tests
  • [ ] Manual tests

Release Plan

kerdosa avatar Nov 18 '21 21:11 kerdosa

@kerdosa Thanks for the contribution, would you mind adding a unit and integration test for this?

kpatelatwork avatar Nov 18 '21 21:11 kpatelatwork