diff --git a/chromadb/execution/expression/operator.py b/chromadb/execution/expression/operator.py index 176d87eb987..31541f42366 100644 --- a/chromadb/execution/expression/operator.py +++ b/chromadb/execution/expression/operator.py @@ -860,6 +860,8 @@ def __add__(self, other: Union["Rank", float, int]) -> "Sum": def __radd__(self, other: Union[float, int]) -> "Sum": """Right addition: value + rank""" + if isinstance(other, (int, float)): + return Sum([Val(other), self]) return Val(other) + self def __sub__(self, other: Union["Rank", float, int]) -> "Sub":