linkedin / linkedin/goavro

`CanonicalSchema` and `SchemaCRC64Avro` fail to inline sub-schemas referenced by name

Open
#138 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Go
Stars
1.1k
Forks
232
PR merge metrics
No merged PRs in 30d

Description

If the type of a record field, array, or map-value refers to a previously-declared type by name (eg, `"type": "com.example.MyEmbeddedType"`), then the structure used to compute the `schemaCanonical` string (and thus the schema fingerprint) should embed the fully-specified sub-schema, rather than just the type name.

The current implementation fails to dereference the named schema, resulting in incorrect canonicalization and fingerprinting.

I can follow up later with a concrete example, and I'm working on a fix which I will hopefully submit for review soon.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the CanonicalSchema and SchemaCRC64Avro entry points, then trace named-type handling for record fields, array items, and map values. Done means schemaCanonical embeds each fully specified referenced sub-schema and SchemaCRC64Avro produces the corresponding fingerprint for these cases.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
data
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.