dimas-b commented on code in PR #4018:
URL: https://github.com/apache/polaris/pull/4018#discussion_r2982005451
##########
persistence/nosql/persistence/impl/src/main/java/org/apache/polaris/persistence/nosql/impl/indexes/AbstractIndexElement.java:
##########
@@ -20,27 +20,30 @@
import com.google.common.base.MoreObjects;
import com.google.errorprone.annotations.Var;
-import java.util.Map;
import java.util.Objects;
+import org.apache.polaris.persistence.nosql.api.index.Index;
-abstract class AbstractIndexElement<V> implements IndexElement<V> {
+abstract class AbstractIndexElement<V> implements InternalIndexElement<V> {
@Override
public boolean equals(Object o) {
- if (!(o instanceof Map.Entry<?, ?> other)) {
- return false;
- }
if (o == this) {
return true;
}
- return getKey().equals(other.getKey()) && Objects.equals(getValue(),
other.getValue());
+ if (o instanceof InternalIndexElement<?> other) {
+ return key().equals(other.key()) && Objects.equals(valueNullable(),
other.valueNullable());
+ }
+ if (o instanceof Index.Element<?> other) {
+ return key().equals(other.key()) && Objects.equals(valueNullable(),
other.value());
Review Comment:
I'm fine merging "as is". Opened #4049 for follow-up.
--
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]