Commit 8af9c53
refactor(udf): scalar from_parts now takes Vec<DataType>, matching udaf/udwf
`PythonFunctionScalarUDF::from_parts` previously took `Vec<Field>`
for inputs only to call `.data_type()` on every entry inside `new` —
nullability and metadata went straight in the bin because
`Signature::exact` cannot represent them. The codec carried full
Field info through IPC but threw it away one frame later.
Take `Vec<DataType>` instead. The codec extracts data types from the
decoded IPC schema and feeds them in directly. `return_field` is
still a `Field` so per-output nullability/metadata round-trips
intact, the same way `state_fields` is preserved on the aggregate
side. The Python constructor path (`PyScalarUDF::new`) still goes
through `new` with `Vec<Field>` since PyArrow already hands it the
full Field list.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent b5684bc commit 8af9c53
2 files changed
Lines changed: 15 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
527 | 527 | | |
528 | 528 | | |
529 | 529 | | |
530 | | - | |
| 530 | + | |
531 | 531 | | |
532 | 532 | | |
533 | | - | |
| 533 | + | |
534 | 534 | | |
535 | 535 | | |
536 | 536 | | |
| |||
552 | 552 | | |
553 | 553 | | |
554 | 554 | | |
555 | | - | |
| 555 | + | |
556 | 556 | | |
557 | 557 | | |
558 | 558 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
86 | 87 | | |
87 | 88 | | |
88 | 89 | | |
89 | | - | |
| 90 | + | |
90 | 91 | | |
91 | 92 | | |
92 | 93 | | |
93 | | - | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
94 | 100 | | |
95 | 101 | | |
96 | 102 | | |
| |||
0 commit comments