Skip to content

Commit 0185f08

Browse files
authored
Update db_dtypes/json.py
1 parent ba516c7 commit 0185f08

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

db_dtypes/json.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,8 @@ def _cmp_method(self, other, op):
153153
elif op.__name__ == "ne":
154154
result = pyarrow.compute.not_equal(self._pa_array, self._box_pa(other))
155155
else:
156-
raise NotImplementedError(f"{op.__name__} not implemented for JSONArray")
156+
# Comparison is not a meaningful one. We don't want to support sorting by JSON columns.
157+
raise TypeError(f"{op.__name__} not supported for JSONArray")
157158
return arrays.ArrowExtensionArray(result)
158159

159160
def __getitem__(self, item):

0 commit comments

Comments
 (0)