Skip to content

HollowObjectTypeMapper to read primitive nulls from HollowObject and FlatRecord with sentinel values

Compare
Choose a tag to compare
@vvstej vvstej released this 16 Dec 19:57
· 3 commits to master since this release
3f11f46

Primitives like int, long, float, double, char, byte which when are absent are stored with sentinel values(references are stored with null), for example ints are stored with Int.MIN_VALUE etc. However when we read them back as a Pojo we are not setting the sentinel value on the Pojo's relevant field. This can cause inaccurate comparisons as the nullness is lost during deserialization.
This release is to fix the above case by consistently reading back primitive nulls(empty records) with sentinel values. As part of the fix we also consistently handle the writing to hollow state where sentinel values can be specified in the pojo and the corresponding hollow record/flat record will be persisted with null fields.