DBZ-8689 Provide config to override all date/datetime cols to nullable #228
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Ticket https://issues.redhat.com/browse/DBZ-8689
Considered using a custom converter, but it appeared to be an overly complex solution. Since these are temporal types, they conversion logic is dependent on the temporal mode eg for date or datetime. The converter would need to read in all these configs, and duplicate the logic (since the value conversion should be the same). So code is no longer dry and have potential for drift. All we need is to set the schema to be optional (but want an identical converter). I didn't see a good way to do this (nor a good way to read in those temporal configs in a custom converter), so I opted for a separate config that is read in when building the schema & value converters in
VitessValueConverter
. Please let me know if there's a better way to do this.This config seems more akin to time.precision.mode setting which could technically be done with a custom converter but not without significant downside, so instead we have the connectors' main value converter read it in and handle the conversion logic there.