goutamadwant opened a new pull request, #12009:
URL: https://github.com/apache/seatunnel/pull/12009

   ### Purpose of this pull request
   
   Fixes #12008.
   
   `SeaTunnelRowTypeToAvroSchemaConverter` preserves field names when it builds 
the Avro schema, while `RowToAvroConverter` lowercased names before looking 
them up in that schema. Avro field lookup is case-sensitive, so mixed-case 
fields failed before the record could be serialized. This patch uses the 
schema's exact field names for both top-level and nested `ROW` values.
   
   ### Does this PR introduce _any_ user-facing change?
   
   Yes. Previously, a schema containing a field such as `CustomerID` or a 
nested field such as `InnerID` failed during Avro serialization. These fields 
now serialize and deserialize with their original case.
   
   Existing lowercase schemas behave unchanged. This patch does not change 
public APIs, configuration, dependencies, generated schemas, or the serialized 
layout of schemas that already worked.
   
   ### How was this patch tested?
   
   Added byte-level Avro serialization/deserialization regression tests for:
   
   - case-distinct top-level fields, `CustomerID` and `customerid`
   - a nested `ROW` field named `InnerID`
   - existing lowercase-field behavior through the complete Avro module test 
suite
   
   Verification:
   
   - JDK 8: `./mvnw -pl seatunnel-formats/seatunnel-format-avro verify` (6 
tests passed)
   - JDK 11: `./mvnw -pl seatunnel-formats/seatunnel-format-avro verify` (6 
tests passed)
   - JDK 8 shared-consumer reactor: `./mvnw -q -DskipTests verify -pl 
seatunnel-formats/seatunnel-format-avro,seatunnel-connectors-v2/connector-kafka,seatunnel-connectors-v2/connector-pulsar
 -am` (passed)
   - `git diff --check upstream/dev..HEAD` (passed)
   
   ### Check list
   
   * [x] No new Jar binary package is added.
   * [x] Documentation is not required because this restores the existing 
case-preserving schema behavior; no configuration or documented format contract 
changes.
   * [x] No incompatible change is introduced, so `incompatible-changes.md` 
does not need an update.
   * [x] The connector checklist is not applicable because this change is 
limited to the shared Avro format module.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to