Skip to content

Commit 1e2fefa

Browse files
committed
0.0.195
1 parent b2f812e commit 1e2fefa

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

orso/dataframe.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,7 @@ def __hash__(self):
425425

426426
_hash = 0
427427
for i, row in enumerate(self._rows):
428-
row_hash = xxh64(str(row).encode())
428+
row_hash = xxh64(str(row).encode()).intdigest()
429429
_hash = i ^ _hash ^ row_hash
430430
return _hash
431431

orso/profiler/profiler.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ def find_mfvs(data, top_n=MOST_FREQUENT_VALUE_SIZE):
7979

8080
def get_kvm_hashes(data, size: int): # slowest function
8181
from xxhash import xxh32
82+
8283
min_hashes = []
8384

8485
data = list(set(data))

tests/test_profiler.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,8 @@ def test_profile_estimators():
131131
values = source.fetchone().as_dict
132132
estimated_cardinality = profile.column("Lauched_at").estimate_cardinality()
133133
assert (
134-
estimated_cardinality * 0.75 < values["unique_timestamps"] < estimated_cardinality * 1.25
135-
), f"{profile.column('Launched_at').estimate_cardinality()} != {values['unique_timestamps']}"
134+
estimated_cardinality * 0.70 < values["unique_timestamps"] < estimated_cardinality * 1.30
135+
), f"{profile.column('Lauched_at').estimate_cardinality()} != {values['unique_timestamps']}"
136136

137137
source = opteryx.query("SELECT COUNT(*) AS price_over_100 FROM $missions WHERE Price > 100")
138138
values = source.fetchone().as_dict

0 commit comments

Comments
 (0)