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:
Will Jones
2026-07-14 21:23:10 -07:00
parent 4d6d9082e7
commit 5d3f06c44a
2 changed files with 8 additions and 5 deletions
+4 -1
View File
@@ -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()
)