apache / parquet-java

Apache Parquet Java
https://parquet.apache.org/
Apache License 2.0
2.65k stars 1.41k forks source link

GH-2992: Gate LocalTimestamp references in AvroSchemaConverter #2993

Closed clairemcginty closed 3 months ago

clairemcginty commented 3 months ago

Rationale for this change

See linked issue; AvroSchemaConverter references Avro classes and methods that don't exist before Avro 1.10

What changes are included in this PR?

Performs an Avro version check to silo references to local timestamp classes.

Are these changes tested?

I've tested them locally on one of my projects using Avro 1.8... unfortunately there isn't a great way to unit-test this :/

Are there any user-facing changes?

This should preserve the existing behavior for Avro 1.8 users while unlocking the new LocalTimestamp types for 1.10+ users.

Closes #2992

clairemcginty commented 3 months ago

cc @RustedBones , can you take a look at this fix as well?