Skip to content

Conversation

@nastra
Copy link
Contributor

@nastra nastra commented Jun 18, 2021

@nastra
Copy link
Contributor Author

nastra commented Jun 18, 2021

/cc @rdblue

newFields.add(copyField(field, type));

if (field.schema() != type) {
if (!Objects.equal(field.schema(), type)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

This was intentionally checking object identity because we want to rebuild if anything about the object changed, not just the fields that are used for equality. Part of the rationale is that we don't necessarily want to assume that equals is strict for types. But since we do have strict equality that checks all fields (including doc) I think this is fine.

@rdblue rdblue merged commit 965775a into apache:master Jun 18, 2021
@nastra nastra deleted the equals-instead-of-ref-equality branch June 18, 2021 18:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants