iemejia opened a new pull request, #3952:
URL: https://github.com/apache/avro/pull/3952

   ## What
   
   AVRO-3235 reported that schema evolution crashed when a record/enum kept the 
same simple name but changed **namespace** across versions (a common versioning 
pattern). The underlying behaviour has since been fixed — the resolver matches 
enums by their **simple name** (`Resolver.EnumAdjust.resolve` uses 
`getName()`), so cross-namespace enums resolve correctly. But there was **no 
dedicated regression test** for that case.
   
   I reproduced the original scenario on current `main` and confirmed it works 
(v1 record read by a v2 reader: the enum resolves and the added field takes its 
default). This PR locks that in.
   
   ## Test
   
   Adds `TestResolver.resolveEnumAcrossNamespaces`:
   - asserts the enum action is an `EnumAdjust` (not a `NAMES_DONT_MATCH` 
error) for `test.v1.Status` → `test.v2.Status`;
   - does a full binary round-trip: writer record `test.v1.Simple` → reader 
record `test.v2.Simple` with an extra defaulted `description` field, asserting 
the enum resolves and the default is inserted.
   
   This guards against a regression, which is especially relevant given the 
related tension around name-vs-fullname matching (AVRO-3703).
   
   Closes AVRO-3235.
   
   JIRA: https://issues.apache.org/jira/browse/AVRO-3235


-- 
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