DavidNeukamXXXLutz commented on PR #3516:
URL: https://github.com/apache/avro/pull/3516#issuecomment-3405151914

   I identified an issue with this change.
   Though being a correct fix, people could currently rely on the buggy 
behaviour of having the C# names in the SCHEMA files.
   For them, this could be a breaking change.
   
   Another issue is, that the Avro deserializer does not support mapping form 
Avro Namespaces to C# namespaces.
   The issue is, that the 
[ObjectCreator](https://github.com/apache/avro/blob/main/lang/csharp/src/apache/main/Specific/ObjectCreator.cs)
 does not have an extension point to provide the (reverse) namespace mappings.
   It searches for the types with the namespaces given in the Avro schema.
   By a hacky solution, I could make this work by adding the types to 
typeCacheByName via reflection.
   
   I checked the Java implementation and it looks like they also dont support 
namespace mapping.
   
   I thend to come to the conclusion, that the avrogen should not have a 
--namespace flag as the other Avro tooling does not support namespace mappings 
- so we are depending on a bug in the code generation to be able to deserialize 
the types again (affecting the contract).
   
   I would suggest deprecating the --namespace flag with that information.
   
   
   
   
   


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