Commit ad0f956
docs(ray-example): drop unnecessary UDF registration
The actor was calling `ctx.register_udf(...)` and `set_worker_ctx(ctx)`
to make the inbound expression's UDF resolvable on the worker. With
Python scalar/aggregate/window UDFs now traveling inside the
serialized expression, neither call is necessary — the actor just
needs a `SessionContext` to evaluate against.
Also drops the parallel `sender.register_udf(...)` in the driver; an
expression built with a `udf(...)` callable carries its own reference
and does not require the UDF to be registered on the driver session.
Result: each actor is a few lines (one `SessionContext`, one
`evaluate` method) — what the inline-UDF story is actually trying
to demonstrate.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent d7a1ff4 commit ad0f956
1 file changed
Lines changed: 8 additions & 18 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
25 | 23 | | |
26 | 24 | | |
27 | 25 | | |
| |||
33 | 31 | | |
34 | 32 | | |
35 | 33 | | |
36 | | - | |
37 | 34 | | |
38 | 35 | | |
39 | 36 | | |
40 | | - | |
| 37 | + | |
41 | 38 | | |
42 | 39 | | |
43 | 40 | | |
| |||
52 | 49 | | |
53 | 50 | | |
54 | 51 | | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
| 52 | + | |
62 | 53 | | |
63 | 54 | | |
64 | 55 | | |
65 | | - | |
66 | | - | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
67 | 59 | | |
68 | 60 | | |
69 | 61 | | |
| |||
72 | 64 | | |
73 | 65 | | |
74 | 66 | | |
75 | | - | |
76 | | - | |
77 | 67 | | |
78 | 68 | | |
79 | 69 | | |
| |||
0 commit comments