feat(#286): add serializers for ZoneId, ZoneOffset, ZonedDateTime and OffsetDateTime #288
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.
Hi @novakov-alexey,
Here is the firsts serializers teased in #286:
java.time.ZoneId
java.time.ZoneOffset
java.time.ZonedDateTime
java.time.OffsetDateTime
These serializers are quite straightforward but I have few things to check with you:
VariableLengthDataType
with value-1
to indicate a variable length for the serializer, I replaced it everywhere and made 2 small optimizations inCoproductSerializer
andEitherSerializer
, if you are OK with them (fixed length data when possible allows Flink to do some optimizations especially on keys).NullMarker
with valueInt.MinValue
to mark a null value. UsingInt.MinValue
to be outside-64800
to+64800
validity range forZoneOffset
.SimpleTypeInfo
to replaceSimpleTypeInformation
. It's a simple case class simpler to use than abstractSimpleTypeInformation
which require to create a subclass for each use. I don't know if you want to keepSimpleTypeInformation
, I only deprecated it for now.