Skip to content
This repository has been archived by the owner on Apr 22, 2022. It is now read-only.

Support mapping native Avro timestamps. #245

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

asnare
Copy link
Member

@asnare asnare commented May 20, 2019

This pull request updates the timestamp() and clientTimestamp() providers to produce native timestamps that can be mapped to Avro fields with the timestamp logical types.

Such records are compatible with downstream consumers, but on the Divolte side schemas will need to be updated so that the timestamp fields have the correct logical types.

Documentation updates are also required.

Changes include:

 - The timestamp() and clientTimestamp() providers now produce native timestamps.
 - Updating some of the test scaffolding so that we can test the decoded Avro record, not the mapped one. The mapped one is prior to 'conversions' that we want to check for.

Backwards compatibility for mappings is impacted by this change: the timestamp providers can no longer map onto long fields unless they have the correct logical type. Fixing this is hard: Avro only lets us set the logical type, not the raw type, and providers don't know the target type so we can't adjust their behaviour depending on the target.
@asnare asnare added this to the 0.10.0 milestone May 20, 2019
@asnare asnare self-assigned this May 20, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant