Skip to content

Commit 88c7946

Browse files
committed
0.0.191
1 parent fb32feb commit 88c7946

File tree

4 files changed

+13
-41
lines changed

4 files changed

+13
-41
lines changed

orso/cityhash/__init__.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,11 @@
1-
from cityhash import CityHash32
2-
from cityhash import CityHash64
1+
from opteryx.third_party.cyan4973.xxhash import hash_bytes
2+
3+
def CityHash32(data: bytes) -> int:
4+
if not isinstance(data, bytes):
5+
data = str(data).encode()
6+
return hash_bytes(data) & 0xFFFFFFFF
7+
8+
def CityHash64(data: bytes) -> int:
9+
if not isinstance(data, bytes):
10+
data = str(data).encode()
11+
return hash_bytes(data) & 0xFFFFFFFFFFFFFFFF

orso/display.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -344,8 +344,7 @@ def _inner():
344344
elif column.type == OrsoTypes.DECIMAL and column.precision is not None:
345345
col_types.append(f"DECIMAL({column.precision},{column.scale})")
346346
else:
347-
col_types.append(column.type)
348-
col_types = [column.type for column in t.schema.columns]
347+
col_types.append(str(column.type))
349348
else:
350349
col_types = [OrsoTypes._MISSING_TYPE] * len(t.schema)
351350
col_type_width = list(map(len, col_types)) if show_types else [0] * len(col_types)

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
cityhash
21
data-expectations>=1.6.0
32
orjson
43
ormsgpack
4+
opteryx>=0.19.0
55
pandas
66
pyarrow
77
numpy

tests/test_cityhash.py

Lines changed: 0 additions & 36 deletions
This file was deleted.

0 commit comments

Comments
 (0)