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

fix: use semantic instead of literal comparison in DefaultEqualityTester #1665

Merged
merged 2 commits into from May 12, 2020

Conversation

mars-lan
Copy link
Contributor

@mars-lan mars-lan commented May 8, 2020

This fixes #1663
Also change the signature of EqualityTester to compare only DataTemplates

Checklist

  • The PR conforms to DataHub's Contributing Guideline (particularly Commit Message Format)
  • Links to related issues (if applicable)
  • Tests for the changes have been added/updated (if applicable)
  • Docs related to the changes have been added/updated (if applicable)

This fixes datahub-project#1663
Also change the signature of EqualityTester to compare only DataTemplates
Copy link
Contributor

@keremsahin1 keremsahin1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mars-lan
Copy link
Contributor Author

Actually upon closer inspection, we should probably use rest.li's DataMapUtils instead of messing with the codecs directly: https://linkedin.github.io/rest.li/how_data_is_serialized_for_transport

Will discard this PR and try a different approach instead.

@mars-lan mars-lan closed this May 11, 2020
@mars-lan
Copy link
Contributor Author

Actually DataMapUtils is in the internal namespace (com.linkedin.restli.internal.server.util) so probably not a good idea to depend on it. It's also doing exactly the same JSON serialization/deserialization in our RecordUtils without special coercion fix-up. Look like doing semantic equality testing is still the most appropriate fix in this case. Re-opening the PR with added unit test.

@mars-lan mars-lan reopened this May 11, 2020
@mars-lan mars-lan merged commit 2b9c8f7 into datahub-project:master May 12, 2020
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

Successfully merging this pull request may close these issues.

New SchemaMetadata versions created even if content is unchanged
3 participants