This is an automated email from the ASF dual-hosted git repository.
maedhroz pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/cassandra.git
The following commit(s) were added to refs/heads/trunk by this push:
new c12cc0b026 Add equals/hashCode to RangeTermTree$Term to make sure it
plays nicely with IntervalNode construction
c12cc0b026 is described below
commit c12cc0b026310f54dad756e18db09b5db8196845
Author: Caleb Rackliffe <[email protected]>
AuthorDate: Tue Oct 7 18:53:04 2025 -0500
Add equals/hashCode to RangeTermTree$Term to make sure it plays nicely with
IntervalNode construction
patch by Caleb Rackliffe; reviewed by Ariel Weisberg for CASSANDRA-20866
---
.../apache/cassandra/index/sai/view/RangeTermTree.java | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/src/java/org/apache/cassandra/index/sai/view/RangeTermTree.java
b/src/java/org/apache/cassandra/index/sai/view/RangeTermTree.java
index 2da7acfb19..7817740293 100644
--- a/src/java/org/apache/cassandra/index/sai/view/RangeTermTree.java
+++ b/src/java/org/apache/cassandra/index/sai/view/RangeTermTree.java
@@ -21,6 +21,7 @@ package org.apache.cassandra.index.sai.view;
import java.nio.ByteBuffer;
import java.util.ArrayList;
import java.util.List;
+import java.util.Objects;
import com.google.common.base.MoreObjects;
import org.slf4j.Logger;
@@ -124,5 +125,19 @@ public class RangeTermTree
{
return MoreObjects.toStringHelper(this).add("term",
indexTermType.asString(term)).toString();
}
+
+ @Override
+ public boolean equals(Object other)
+ {
+ if (other == null || getClass() != other.getClass()) return false;
+ Term otherTerm = (Term) other;
+ return Objects.equals(term, otherTerm.term) &&
Objects.equals(indexTermType, otherTerm.indexTermType);
+ }
+
+ @Override
+ public int hashCode()
+ {
+ return Objects.hash(term, indexTermType);
+ }
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]