Skip to content

xlstream-eval: replace handler wrappers with Dispatch enum#183

Merged
cilladev merged 2 commits into
feat/formula-registry-v2from
feat/eval-mode-dispatch
Jun 1, 2026
Merged

xlstream-eval: replace handler wrappers with Dispatch enum#183
cilladev merged 2 commits into
feat/formula-registry-v2from
feat/eval-mode-dispatch

Conversation

@cilladev

Copy link
Copy Markdown
Owner

Summary

  • Add Dispatch enum (Eager/Aggregate/Custom) to FunctionEntry, replacing the Handler type alias
  • Delete 134 boilerplate handle_* wrappers from builtins/mod.rs (-784 lines net)
  • Aggregate functions (sum, count, etc.) return Value directly instead of Result<Value, CellError>
  • 7 statistical functions (builtin_poisson_dist, builtin_binom_dist, etc.) return Value directly
  • Spec: docs/roadmap/v0.4/03-eval-mode-dispatch.md

Stacked on #182. Do not merge until #182 merges. Rebase if #182 changes.

Test plan

  • All ~2700 tests pass
  • make check passes (fmt, clippy, test, doctest)
  • CHANGELOG updated
  • Roadmap checkbox ticked

- add Dispatch enum (Eager/Aggregate/Custom) to FunctionEntry
- delete 134 boilerplate handle_* wrappers from builtins/mod.rs
- aggregate functions return Value directly (not Result)
- 7 statistical functions return Value directly (not Result)
- update subtotal.rs and test callers

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.20.

Benchmark suite Current: f3adae0 Previous: a79fc8a Ratio
date/datedif 669 ns/iter (± 10) 534 ns/iter (± 15) 1.25
math/int 119 ns/iter (± 3) 92 ns/iter (± 0) 1.29
string/textjoin 341 ns/iter (± 32) 281 ns/iter (± 6) 1.21

This comment was automatically generated by workflow using github-action-benchmark.

- remove stale # Errors rustdoc from 10 aggregate fns (now return Value)
- remove stale # Errors rustdoc from 7 statistical fns (now return Value)
- convert 7 statistical wrappers to Dispatch::Eager, delete handle_* fns
- update spec to reflect direct return-type changes (no _as_value wrappers)
- add agg_kind_implies_dispatch_aggregate registry invariant test
@cilladev cilladev merged commit bcfa8e7 into feat/formula-registry-v2 Jun 1, 2026
10 of 11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant