Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Breaking change in Avro 1.12.1 affects parquet-avro users: logical types now deserialize to different Java types

Open
#3,515 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Quiet
Tech stack
java

Research direction

Start with the issue's AVRO-3989 link and the ReflectData, SpecificData, and GenericRecord behavior described here; no parquet-java file or test is named. Compare Avro 1.12.0 and 1.12.1 handling for the listed logical types, then determine with maintainers what change or documentation is expected before defining done.

Written by the indexing model from the issue text.

Description

Summary

Avro 1.12.1 introduces a breaking change that affects parquet-avro users. Multiple logical types are now deserialized to their proper Java types instead of their underlying primitive types when using ReflectData, causing ClassCastException in existing code.

Background

Problem

The fix in AVRO-3989 changed the deserialization behavior for ALL logical types. When using within parquet-avro ReflectData or SpecificData classes, these fields now return their logical Java type objects instead of their underlying primitive types from GenericRecord.

Affected logical types and conversions:
Logical Type Old Type (≤1.12.0) New Type (1.12.1)
timestamp-millis Long Instant
timestamp-micros Long Instant
date Integer LocalDate
time-millis Integer LocalTime
time-micros Long LocalTime
local-timestamp-millis Long LocalDateTime
local-timestamp-micros Long LocalDateTime
uuid String UUID
decimal ByteBuffer BigDecimal

This breaks existing code that expects primitive values:

// This used to work in Avro 1.12.0
Long timestamp = (Long) genericRecord.get("timestamp_field");
Integer date = (Integer) genericRecord.get("date_field");
String uuid = (String) genericRecord.get("uuid_field");

// In Avro 1.12.1, all of these throw ClassCastException
// because values are now Instant, LocalDate, UUID, etc.

Impact

  • Widespread breakage: Affects anyone using parquet-avro with ANY logical types
  • Code that has worked for years suddenly breaks after a patch version update
  • The breaking nature wasn't clearly documented in Avro's changelog
  • This is a significant behavior change that affects the entire logical type system

Heads up for future avro updates

I apologize if this isn't the right place to report this, please feel free to redirect me if there's a better venue for this discussion. My main goal is to ensure that when parquet-java does consider updating Avro, the team and users are aware of this significant behavioral change.

For Current Users

If you're using parquet-avro and explicitly upgrading Avro to 1.12.1+ in your project, be aware of this breaking change. You'll need to update code that reads logical type fields from GenericRecord.

Dominant language
Java
Stars
3.1k
Forks
1.6k
Avg merge
4d 12h
Merged PRs (30d)
28

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from apache/parquet-java

All issues in apache/parquet-java

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.