Skip to content

Releases: linkedin/avro-util

0.2.52

01 Oct 06:08
1cbd0ca
Compare
Choose a tag to compare
fix detection of exact avro 1.7 version under classpaths with multipl…

0.2.51

01 Oct 00:08
53efed6
Compare
Choose a tag to compare
make sure to always fully-qualify exceptions in generated catch claus…

0.2.50

25 Sep 04:49
c1ab693
Compare
Choose a tag to compare
preserve root cause of SpecificCompiler instantiation failure, also a…

Pretty print Json

21 Sep 19:22
13dc787
Compare
Choose a tag to compare
Pretty print Json Pre-release
Pre-release

Enable pretty-print in Avro 1.4, 1.5, and 1.6 adapters

0.2.48

14 Sep 01:17
80023ac
Compare
Choose a tag to compare
add getDefaultValueAsJsonString method to helper. addresses #195 (#196)

0.2.47

10 Sep 17:53
88b831d
Compare
Choose a tag to compare
Added a flag in FastDatumReader/FastDatumWriter to indicate whether f…

0.2.46

01 Sep 17:20
6c74e98
Compare
Choose a tag to compare
Updated fast-avro to align with vanilla to return mutable empty map (…

0.2.45: add Helper.parse(InputStream) (#187)

31 Aug 16:56
ad30d45
Compare
Choose a tag to compare

0.2.44: Fix the handling of null default values. (#182)

24 Aug 20:22
5cd9cf0
Compare
Choose a tag to compare
* Fix the way a null default value is handled.

This PR concerns calls to `createSchemaField()` where the default value
passed in is null.

Null as a default value is only really valid in two situations:
(1) When the field is of type "null", or
(2) When the field is of type union where the first entry in the union
    is "null".

Case (1) is a weird case that nobody really cares about in practice.

The Avro libraries themselves (all versions) recognize case (2) (and
case (2) only) and convert the null into a NullNode object. In all
other cases, the null is left alone (no conversion to NullNode).

So, we do the same here.

Note: The compat helper's behaviour was inconsistent before this PR.
In Avro 1.8 and earlier, we always converted a null default into an
object; In Avro 1.9 and 1.10, null was never converted. This PR makes
them behave consistently.

* Use the field's schema instead of passing it in as a param.

Also add much better comments and tests.

0.2.43: Adding support for defaults from EnumSymbols (#177)

02 Aug 22:45
498f9b1
Compare
Choose a tag to compare
When creating fields with the FieldBuilder and supplying a default
value to the field builder by using the adapter's genericDefaultValue
from an existing field, it will return a `GenericData.EnumSymbol`.

This changeset makes Jackson1Utils `GenericData.EnumSymbol` aware.

Co-authored-by: Christopher Harris <chharris@chharris-mn2.linkedin.biz>