Skip to content

Commit cea9254

Browse files
timsaucerclaude
andcommitted
refactor(udaf): name synthesized state fields state_{i}
The Python constructor path collapses input `Vec<DataType>` into synthesized `FieldRef`s; bare integer names (`"0"`, `"1"`) made EXPLAIN and debug output for the state schema opaque. Use `state_{i}` to match the `arg_{i}` convention the codec applies on the input-field side. The post-decode path is unaffected — the codec ships full `FieldRef`s (with the names the sender chose) through IPC and bypasses this synthesis entirely. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 54bbdf8 commit cea9254

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

crates/core/src/udaf.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ impl PythonFunctionAggregateUDF {
180180
let state_fields = state_types
181181
.into_iter()
182182
.enumerate()
183-
.map(|(i, t)| Arc::new(Field::new(format!("{i}"), t, true)))
183+
.map(|(i, t)| Arc::new(Field::new(format!("state_{i}"), t, true)))
184184
.collect();
185185
Self {
186186
name,

0 commit comments

Comments
 (0)