Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
Description
If you generate Java classes from schema, SCHEMA$ variable differs from the original schema. It causes issues like this and this when using Schema registry.
The issue happens when the schema in the registry is configured externally and then you try to use generated Java class. The schema in the registry does not match the schema in the class and thus the write is refused.
Technically it's easy to fix (see the attached patch) but I guess there will be some backward compatibility concerns.
If it is not acceptable, would it be at least possible to add the originalSchema context variable so we could solve it using custom template.
The patch is not final, its purpose is just to convey the idea.