Skip to content

Add vortex.is_nan expression with stats-based pruning - #9949

Open
Ecthlion wants to merge 5 commits into
vortex-data:developfrom
Ecthlion:add-is-nan-expression
Open

Ecthlion wants to merge 5 commits into
vortex-data:developfrom
Ecthlion:add-is-nan-expression

Conversation

@Ecthlion

@Ecthlion Ecthlion commented Sep 20, 2026

Copy link
Copy Markdown

Summary

Adds the IS NAN expression called out in #9913, implemented as a strict RowFn as suggested in the issue: null inputs propagate to null outputs (output nullability follows the input), and only primitive float inputs are accepted.

Changes

  • New vortex.is_nan scalar function in vortex-array implemented with the RowFn row-wise kernel framework, registered in the scalar fn session and exposed as expr::is_nan / expr::bound::is_nan.
  • Stats rewrites mirroring the is_null rules so the predicate prunes from zone maps:
    • falsify: nan_count(x) = 0 or all_non_nan(x)
    • satisfy: nan_count(x) = row_count() or all_nan(x)
  • Unit tests for evaluation (valid/null floats, constants, sliced arrays, non-float rejection), dtype strictness, display, and the falsify/satisfy rewrites.

AI disclosure: this change was developed with assistance from Kimi K3.

@Ecthlion
Ecthlion force-pushed the add-is-nan-expression branch from 3bd0e55 to 9ffe04a Compare September 20, 2026 02:49
@Ecthlion
Ecthlion marked this pull request as draft September 20, 2026 04:00
Signed-off-by: Yuyun Zhang <1252232014@qq.com>

Co-Authored-By: Kimi K3
@Ecthlion
Ecthlion force-pushed the add-is-nan-expression branch from 9ffe04a to ee39587 Compare September 20, 2026 04:58
@Ecthlion
Ecthlion marked this pull request as ready for review September 20, 2026 07:09
@codspeed

codspeed Bot commented Sep 21, 2026

Copy link
Copy Markdown

Merging this PR will degrade performance by 16.65%

⚠️ Unknown Walltime execution environment detected

Using the Walltime instrument on standard Hosted Runners will lead to inconsistent data.

For the most accurate results, we recommend using CodSpeed Macro Runners: bare-metal machines fine-tuned for performance measurement consistency.

⚡ 1 improved benchmark
❌ 5 regressed benchmarks
✅ 2247 untouched benchmarks
⏩ 218 skipped benchmarks1

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Mode Benchmark BASE HEAD Efficiency
WallTime arrow_checked_add_u32_neon[16384] 12.3 µs 20.3 µs -39.28%
WallTime mul_u64_nonnull_neon 15.5 µs 21.3 µs -27.39%
WallTime mul_i64_nonnull_neon 17.3 µs 20.4 µs -14.82%
WallTime multiply_shapes_neon[(16384, PerRowPerRow)] 17.4 µs 20.4 µs -14.7%
WallTime words_gather_scalar_avx2[65536] 8.2 µs 9.4 µs -11.93%
WallTime filtered_sink_i64_avx512[OneNullInEight] 26.6 µs 22.4 µs +18.88%

Tip

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


Comparing Ecthlion:add-is-nan-expression (09f5aff) with develop (f5b3b26)

Open in CodSpeed

Footnotes

  1. 218 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.

Comment thread vortex-array/src/stats/rewrite/builtins.rs
@robert3005 robert3005 added the changelog/feature A new feature label Sep 21, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog/feature A new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants