diff --git a/chromadb/execution/expression/operator.py b/chromadb/execution/expression/operator.py index 176d87eb987..d10267759b1 100644 --- a/chromadb/execution/expression/operator.py +++ b/chromadb/execution/expression/operator.py @@ -438,10 +438,11 @@ class Key: def __init__(self, name: str): self.name = name + self._hash = hash(name) def __hash__(self) -> int: """Make Key hashable for use in sets""" - return hash(self.name) + return self._hash # Comparison operators def __eq__(self, value: Any) -> Eq: # type: ignore[override]