mirror of
https://github.com/lancedb/lancedb.git
synced 2026-08-18 12:08:35 +00:00
test: update hash-split expectations for DataFusion 54 foldhash
DataFusion 54's `create_hashes` uses foldhash instead of ahash, so the concrete hash values (and therefore split assignments) differ from the DF53 baseline: - `test_hash_split` (Rust): recompute the expected per-split counts. - `test_split_hash_with_discard` (Python): hash a high-cardinality column instead of the 2-value `category`, so the discard ratio no longer hinges on where two specific hashes land. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -134,8 +134,11 @@ def test_split_hash_with_discard(mem_db):
|
||||
)
|
||||
|
||||
permutation_tbl = (
|
||||
# Hash a high-cardinality column: "category" has only two distinct
|
||||
# values, so whether anything is discarded would hinge on where those
|
||||
# two hashes land rather than on the discard weight.
|
||||
permutation_builder(tbl)
|
||||
.split_hash(["category"], [1, 1], discard_weight=2) # Should discard ~50%
|
||||
.split_hash(["id"], [1, 1], discard_weight=2) # Should discard ~50%
|
||||
.execute()
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user