File tree Expand file tree Collapse file tree 3 files changed +11
-9
lines changed
Expand file tree Collapse file tree 3 files changed +11
-9
lines changed Original file line number Diff line number Diff line change 1-
21def CityHash32 (data : bytes ) -> int :
3- from opteryx .third_party .cyan4973 .xxhash import hash_bytes
2+ from xxhash import xxh32
3+
44 if not isinstance (data , bytes ):
55 data = str (data ).encode ()
6- return hash_bytes (data ) & 0xFFFFFFFF
6+ return xxh32 (data )
7+
78
89def CityHash64 (data : bytes ) -> int :
9- from opteryx .third_party .cyan4973 .xxhash import hash_bytes
10+ from xxhash import xxh64
11+
1012 if not isinstance (data , bytes ):
1113 data = str (data ).encode ()
12- return hash_bytes (data ) & 0xFFFFFFFFFFFFFFFF
14+ return xxh64 (data )
Original file line number Diff line number Diff line change @@ -421,11 +421,11 @@ def schema(self) -> RelationSchema:
421421 return self ._schema
422422
423423 def __hash__ (self ):
424- from opteryx . third_party . cyan4973 . xxhash import hash_bytes
424+ from xxhash import xxh64
425425
426426 _hash = 0
427427 for i , row in enumerate (self ._rows ):
428- row_hash = hash_bytes (str (row ).encode ())
428+ row_hash = xxh64 (str (row ).encode ())
429429 _hash = i ^ _hash ^ row_hash
430430 return _hash
431431
Original file line number Diff line number Diff line change 11data-expectations >= 1.6.0
22orjson
33ormsgpack
4- opteryx >= 0.20.0
54pandas
65pyarrow
7- numpy
6+ numpy
7+ xxhash
You can’t perform that action at this time.
0 commit comments