Apache Software Foundation / SeaTunnel
Merged upstreamCorrectnessMerged Sep 1, 2026

Preserve Avro field case during serialization

Fixed SeaTunnel's row-to-Avro conversion so top-level and nested fields are looked up using their schema-defined case rather than a lowercased name.

apache/seatunnel · #12009

Data correctness fix

Mixed-case and case-distinct Avro fields now serialize with the exact names already preserved by SeaTunnel's generated schema.

Problem

The schema converter preserved names such as `CustomerID` and `InnerID`, but the record converter lowercased names before Avro's case-sensitive lookup. Serialization therefore failed before producing a record, and case-distinct fields could not be represented correctly.

Approach

Uses the exact Avro schema field names for both top-level rows and nested `ROW` values. Existing lowercase schemas and serialized layouts remain unchanged, with no API, configuration, dependency, or generated-schema change.

Impact and scope

  • Restores serialization for real-world schemas whose identifiers contain uppercase characters.
  • Preserves distinct fields such as `CustomerID` and `customerid` instead of collapsing their lookup behavior.
  • Fixes the shared Avro format path used by downstream connectors without introducing a compatibility break.

Validation

  • Added byte-level round-trip tests for case-distinct top-level fields and a mixed-case nested field.
  • Passed the complete Avro module on JDK 8 and JDK 11 plus the shared Kafka and Pulsar consumer reactor.
  • The authored commit and GitHub-verified merge commit credit Goutam Adwant; two upstream approvals closed GH-12008.