File tree Expand file tree Collapse file tree 4 files changed +13
-41
lines changed
Expand file tree Collapse file tree 4 files changed +13
-41
lines changed Original file line number Diff line number Diff line change 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
Original file line number Diff line number Diff 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 )
Original file line number Diff line number Diff line change 1- cityhash
21data-expectations >= 1.6.0
32orjson
43ormsgpack
4+ opteryx >= 0.19.0
55pandas
66pyarrow
77numpy
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments