danielhumanmod commented on issue #10855:
URL: https://github.com/apache/iceberg/issues/10855#issuecomment-2294653351
Hi @findepi , based on my investigation, the current status regarding the
usage of `ImmutablesReferenceEquality` is as follows:
Currently, `ImmutablesReferenceEquality` is only triggered in line 119 of
`BaseViewOpertaions.java`
```
// if the metadata is not changed, return early
if (base == metadata) {
LOG.info("Nothing to commit.");
return;
}
```
According to PR #10899 ,this comparison is intentionally performing a
reference equality check. Therefore, the
`@SuppressWarnings("ImmutablesReferenceEquality")` here is reasonable.
Considering for most cases we don't encourage reference equality check for
immutable objects, we should consider keep this error-prone check. For cases
where reference equality is indeed necessary, contributors can use
`@SuppressWarnings("ImmutablesReferenceEquality")` to bypass the warning.
However, contributors should explain the necessity of the reference equality
check, and all instances of `@SuppressWarnings` should be carefully reviewed
during code reviews.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]