Repository navigation
Commit ae3cc46
expr: Accept stateful unary and binary functions in the sqlfunc macro (#38941)
`EagerUnaryFunc::call` receives a `&RowArena`, and the `#[sqlfunc]`
macro accepts a `&self` receiver and a trailing `&RowArena` at unary and
binary arity, not only at variadic. This unblocks the hand-written
functions that need state or an arena. A new `skip_display` modifier
keeps a hand-written `Display` for names that depend on state. `inverse`
and `negate` take the function itself, and `output_type_expr` no longer
requires `introduces_nulls`. `RangeCreate` is converted as the first
user, and the macro reference in `doc/developer/sqlfunc.md` is
corrected.
The last commits tidy the macro crate. Modifier validation happens in
one place and reports every error at its modifier, all arities take
their parameters the same way, so a nested reference in a unary or
binary parameter gets the trait's lifetime, and the tests move to
`test.rs`.
The registry reports only `range_create`'s `sqlfunc_signature` moving.
No declared property changed.
Based on #38929.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: Claude Opus 5 (1M context) <[email protected]>1 parent 8d7fa94 commit ae3cc46
63 files changed
Lines changed: 1806 additions & 1325 deletions
File tree
- doc/developer
- src
- catalog/tests
- compute-types/tests/snapshots
- expr-derive-impl/src
- snapshots
- expr-derive/src
- expr/src/scalar
- func
- impls
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
| |||
42 | 43 | | |
43 | 44 | | |
44 | 45 | | |
| 46 | + | |
45 | 47 | | |
46 | | - | |
| 48 | + | |
47 | 49 | | |
48 | 50 | | |
49 | 51 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
| 23 | + | |
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
| 31 | + | |
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
35 | 36 | | |
36 | | - | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
37 | 42 | | |
38 | 43 | | |
39 | 44 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments