Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Schema fingerprinting handles union ordering as distinctive feature #801

Open
balassai opened this issue Feb 22, 2023 · 0 comments
Open
Assignees

Comments

@balassai
Copy link
Contributor

In Avro, union types can have any number of types. The first type has a distinct meaning, as that one provides the default value of the field (e.g. this is why optional fields are represented as ["null", "something"]).

Fingerprinting generates different results when the union order is different, while in reality, it should only care about the first item, and then the rest of the types can be in any order.

E.g.

"null", "string", "int" and "int", "null", "string" are different
"null", "string", "int" and "null", "int", "string" are practically the same

IMPORTANT NOTE: fingerprints are stored in the database, so backward compatibility must be addressed if changing this logic.

@balassai balassai self-assigned this Feb 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant