You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I ran into an issue where a particularly large schema was not parsing due to a simple syntax error that was introduced mistakenly while working with it. This was difficult to track down since the behavior in schema.go:929 meant that the json.SyntaxError was never handled and ultimately ends up returning the error from schema.go:976 indicating "Unknown type name:" followed by the entire body of the provided schema.
I am unsure the intention for schema.go:929 but I noticed that it was present in the original version of this library by @elodina. Is there a reason that given an error returned while JSON unmarshaling the schema should still be passed on to schemaByType or is it safe to go ahead and handle the json error since it is not likely (or impossible) that it is a valid avro schema?
I made #14 that may help to show what change I am proposing and as a possible fix/enhancement in cases like this one.
The text was updated successfully, but these errors were encountered:
I'm guessing given that the tests fail for TestPrimitiveSchema that this is my answer for why the json error is disregarded in ParseSchema. Any thoughts on how to best proceed?
I updated the PR with a possible solution. The primitives are handled as a special case in ParseSchema before JSON unmarshaling occurs. Let me know what you think!
I ran into an issue where a particularly large schema was not parsing due to a simple syntax error that was introduced mistakenly while working with it. This was difficult to track down since the behavior in schema.go:929 meant that the
json.SyntaxError
was never handled and ultimately ends up returning the error from schema.go:976 indicating "Unknown type name:" followed by the entire body of the provided schema.I am unsure the intention for schema.go:929 but I noticed that it was present in the original version of this library by @elodina. Is there a reason that given an error returned while JSON unmarshaling the schema should still be passed on to
schemaByType
or is it safe to go ahead and handle the json error since it is not likely (or impossible) that it is a valid avro schema?I made #14 that may help to show what change I am proposing and as a possible fix/enhancement in cases like this one.
The text was updated successfully, but these errors were encountered: