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

Scala Core: add schema matching for unversioned instances #148

Closed
alexanderdean opened this issue Apr 21, 2016 · 7 comments
Closed

Scala Core: add schema matching for unversioned instances #148

alexanderdean opened this issue Apr 21, 2016 · 7 comments
Assignees
Milestone

Comments

@alexanderdean
Copy link
Member

See #147

We want to find the highest matching schema version for an unversioned instance, where:

  • matching means that the instance passes validation against the given schema version
  • highest means that no schema versions with higher numbers pass
@alexanderdean
Copy link
Member Author

I think @fblundun has some ideas on a performant algorithm here - Fred could you share?

@alexanderdean
Copy link
Member Author

@chuwy - should this ticket move to Iglu Scala Client?

@alexanderdean
Copy link
Member Author

Migrated snowplow/iglu-scala-client#53

@chuwy
Copy link
Contributor

chuwy commented Apr 21, 2016

I actually think it should belong to core. But It also depends on when do we need it. I don't have plans to migrate iglu client to core in near version. It can introduce breaking changes in SCE, so decided to be very careful on it.

@alexanderdean alexanderdean reopened this Apr 21, 2016
@alexanderdean
Copy link
Member Author

Okay, will keep both open for now!

@fblundun
Copy link
Contributor

My original idea was to do a binary search for the last matching schema, instead of just checking starting at the most recent schema and working backwards. However I now don't think this is a good idea, because it assumes that for any two schemas A and B such that A is matching and B is not, A is higher than B. This is not necessarily true - in general I think it is only true given the additional assumption that A and B have the same model and revision.

I suppose we could use that information to reduce the number of schemas we check - e.g. if 1-0-9 isn't matching, we know that 1-0-8 and below also aren't matching. So for each model-revision pair, we need only check the latest addition.

@aldemirenes
Copy link

Migrated to snowplow/iglu-scala-core#28

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

4 participants