Skip to content

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

Merged
robert3005 merged 6 commits into
vortex-data:developfrom
Ecthlion:add-is-nan-expression
Sep 22, 2026
Merged

robert3005 merged 6 commits into
vortex-data:developfrom
Ecthlion:add-is-nan-expression

Conversation

@Ecthlion

@Ecthlion Ecthlion commented Sep 20, 2026

Copy link
Copy Markdown
Contributor

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 10.44%

⚠️ 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.

⚠️ Different runtime environments detected

Some benchmarks with significant performance changes were compared across different runtime environments,
which may affect the accuracy of the results.

Open the report in CodSpeed to investigate

⚡ 2 improved benchmarks
❌ 10 regressed benchmarks
✅ 2196 untouched benchmarks
⏩ 293 skipped benchmarks1

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Mode Benchmark BASE HEAD Efficiency
WallTime mul_u64_nonnull_neon 28.9 µs 40 µs -27.91%
Simulation take_fsl_u32_random[16, 100] 125.9 µs 164.7 µs -23.51%
Simulation bench_compare_sliced_dict_primitive[(3333, 10000)] 160.6 µs 197.9 µs -18.87%
WallTime dbp_assemble_kernel_avx2[(I128, 1024)] 464 ns 560 ns -17.14%
WallTime mul_i64_nonnull_neon 32.8 µs 39 µs -16.11%
WallTime multiply_shapes_neon[(32768, PerRowPerRow)] 32.7 µs 38.9 µs -15.94%
WallTime dbp_assemble_kernel_avx512[(I128, 1024)] 463 ns 544 ns -14.89%
WallTime dict_canonicalize_gt_u8_neon[1000000] 489.7 µs 570.9 µs -14.22%
WallTime filtered_owned_i64_avx2[OneNullInEight] 22.6 µs 25.7 µs -12.18%
WallTime dbp_assemble_kernel_narrow_msp_avx2[(I128, 1024)] 629 ns 709 ns -11.28%
Simulation take_fsl_f16_random[16, 100] 179.5 µs 118.2 µs +51.81%
WallTime filtered_sink_i64_avx512[OneNullInEight] 26.5 µs 22.5 µs +17.91%

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 (265eb6d) with develop (a542cbd)

Open in CodSpeed

Footnotes

  1. 293 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
@robert3005
robert3005 merged commit 2919b50 into vortex-data:develop Sep 22, 2026
95 of 97 checks passed
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