Skip to content

Honour NaN options in min/max over float-backed extension types - #10851

Merged
robert3005 merged 1 commit into
developfrom
rk/minmax-extension-nan-options
Oct 27, 2026
Merged

robert3005 merged 1 commit into
developfrom
rk/minmax-extension-nan-options

Conversation

@robert3005

@robert3005 robert3005 commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

MinMax over an extension type computed the min/max of its storage with the default NaN-skipping options, regardless of the options it was given. A NaN-including min/max (skip_nans=false) over an extension type stored as floats therefore skipped NaNs instead of returning NaN extrema.

MinMax over an extension type computed the min/max of its storage with the
default NaN-skipping options, so `skip_nans=false` was ignored and a NaN in
float storage never poisoned the result. It now passes its options through.

The NaN helpers handle extension types stored as floats: `nan_scalar` wraps a
NaN storage scalar in the extension dtype, `scalar_is_nan` looks through an
extension scalar to its storage, and `min_max` takes the NaN-including path for
float-backed extension arrays.

Signed-off-by: Claude <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01C7zgxB8uAbmjveoSLVvBmD
@robert3005 robert3005 added the changelog/fix A bug fix label Oct 27, 2026 — with Claude
@codspeed

codspeed Bot commented Oct 27, 2026

Copy link
Copy Markdown

Merging this PR will regress 4 benchmarks

4 warnings

⚠️ Walltime results may be unreliable

Some benchmarks used the Walltime instrument outside CodSpeed Macro Runners, which can make the results inconsistent.

Learn more about Macro Runners

See affected benchmarks

⚠️ Unable to measure the execution of 2 benchmarks

These benchmarks measured no execution time, so their results are not comparable and count as unchanged. This usually happens when the compiler removes the code under test.

Prevent compiler optimizations

See affected benchmarks

⚠️ 21 benchmarks are dominated by system calls

System calls cannot be simulated consistently and are left out of the measure. The reported value understates the real cost. Switch to the Walltime instrument to measure them.

Learn more about system calls

See affected benchmarks

⚠️ Base and head ran on different runner types

Some benchmarks with significant performance changes were compared across different runner types, so the changes might not come from the code. Run base and head on the same runner type, or use CodSpeed Macro Runners for more stable results.

Learn more about Macro Runners

Open the report in CodSpeed to investigate

⚡ 11 improved benchmarks
❌ 4 regressed benchmarks
✅ 2424 untouched benchmarks
⏩ 166 skipped benchmarks1

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Mode Benchmark BASE HEAD Efficiency
❌ CPU Simulation chunked_dict_primitive_canonical_into[f64, (1000, 1000, 10)] 146.7 µs 187 µs -21.51%
❌ CPU Simulation take_filter_primitive_small_uncached_random_mask_random_indices[4096, 10] 18.1 µs 22.8 µs -20.48%
❌ CPU Simulation encode_primitives[f32, (1000, 2)] 118.3 µs 147.3 µs -19.73%
❌ CPU Simulation missing_stats[16] 70.8 µs 84.3 µs -16.05%
⚡ Walltime threshold_neon[8] 2.6 µs 1.5 µs +73.32%
⚡ Walltime threshold_neon[80] 4.8 µs 3.4 µs +40.88%
⚡ Walltime filter_neon[64] 2.4 µs 1.7 µs +40.78%
⚡ Walltime threshold_neon[64] 3.8 µs 2.7 µs +39.18%
⚡ Walltime filter_neon[8] 1,203 ns 870 ns +38.28%
⚡ Walltime filter_neon[80] 3 µs 2.4 µs +27.13%
⚡ Walltime starts_with_avx512[8, VarBinView] 86.7 µs 68.4 µs +26.74%
⚡ CPU Simulation test_scan_filter[int] 3.4 ms 3 ms +12.87%
⚡ CPU Simulation null_count_run_end[(32000, 1024, 0.01)] 8.6 µs 7.7 µs +11.63%
⚡ CPU Simulation null_count_run_end[(32000, 256, 0.01)] 8.6 µs 7.7 µs +11.63%
⚡ Walltime threshold_avx2[80] 2.9 µs 2.6 µs +11.36%

Tip

Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.


Comparing rk/minmax-extension-nan-options (514e349) with develop (db0c700)

Open in CodSpeed

Footnotes

  1. 166 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩

@robert3005
robert3005 enabled auto-merge (squash) October 27, 2026 15:45
@robert3005
robert3005 disabled auto-merge October 27, 2026 18:11
@robert3005
robert3005 merged commit 2a725a5 into develop Oct 27, 2026
111 of 113 checks passed
@robert3005
robert3005 deleted the rk/minmax-extension-nan-options branch October 27, 2026 18:11
@connortsui20 connortsui20 mentioned this pull request Nov 2, 2026
9 tasks done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog/fix A bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants