Phoenix500526 opened a new pull request, #23053:
URL: https://github.com/apache/datafusion/pull/23053

   ## Which issue does this PR close?
   
   - N/A — a CI test-gating fix found while building the workspace under 
`force_hash_collisions`. Follow-up to #23044, which fixed the equivalent 
`datafusion-common` test.
   
   ## Rationale for this change
   
   Three `approx_distinct` tests assert exact distinct-count results that 
HyperLogLog can only produce with real hashing. Under the 
`force_hash_collisions` feature, `create_hashes` forces every hash equal, so 
the cardinality estimate collapses to 1 and the assertions fail — breaking the 
`cargo test hash collisions` and `extended_tests` CI jobs:
   
   ```
   update_batch_nullable_filter_excludes_null_filter_rows
   utf8view_groups_short_string_hashed_consistently_across_batches
   utf8view_acc_split_batches_match_single_mixed_batch
   ```
   
   `datafusion-functions-aggregate` did not declare `force_hash_collisions`, so 
a plain `#[cfg(not(feature = "force_hash_collisions"))]` would also raise an 
`unexpected_cfgs` lint and never actually fire.
   
   ## What changes are included in this PR?
   
   - Forward the feature in `datafusion-functions-aggregate/Cargo.toml`:
     `force_hash_collisions = ["datafusion-common/force_hash_collisions"]`, so 
the crate recognises it (and it gets enabled under the workspace 
`force_hash_collisions` build).
   - Gate the three tests (and their test-only imports / helpers) with 
`#[cfg(not(feature = "force_hash_collisions"))]`, matching the pattern already 
used for the equivalent `datafusion-common` tests.
   
   Test-only changes; no production code is touched.
   
   ## Are these changes tested?
   
   - `cargo test -p datafusion-functions-aggregate --features 
force_hash_collisions approx_distinct` — the three tests are now excluded; the 
rest pass.
   - `cargo test -p datafusion-functions-aggregate approx_distinct` (no 
feature) — all tests still present and pass.
   - `cargo clippy -p datafusion-functions-aggregate --all-targets --features 
force_hash_collisions -- -D warnings` — clean.
   
   ## Are there any user-facing changes?
   
   No.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to