You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Six findings from a read-through of the new extension guide, plus the API
rename one of them turned into.
The "process local tokens" note sat in the guide index with nothing around it to
explain what a token was or why the reader should care. It moves to a new
`extension_codec_durable_metadata` section in `codecs.md`, where the reader is
already thinking about what goes in a payload: what to encode, then what the
examples do instead, and the three consequences that follow from parking live
objects in a process-local map — no double decode, no fan-out, and a leak for
any plan that never reaches a decoder. The checklist item now points there
instead of at the guide index.
The hook reference loses its `Capsule name` column, which restated
`datafusion_<thing>` for every row when the naming rule already derives it, and
gains a `Contributes` column instead. The argument column stays: those four
values are protocol, not a signature, and only 4 of the 18 hooks have a Python
definition to link at all — the rest are host-side imports, so links into Rust
source would rot faster than the table. Staleness is handled by
`test_hook_reference_table_lists_every_hook` instead, which greps `crates/` and
`python/datafusion/` for `__datafusion_*__` and diffs the set against the table
rows. Verified it fails when a row is dropped.
`capsule-protocol.md` described `abi_stable`, which datafusion-ffi no longer
uses. It now describes `stabby` and the part that is not stabby: `FFI_Option`
and `FFI_Result` are datafusion-ffi's own, because stabby's require
`T: IStable` and the `FFI_*` structs hold self-referential function pointers.
The conversion example converts to `Arc<dyn TableProvider>` rather than naming
`ForeignTableProvider`, since the `From` impl compares library markers and
returns the original `Arc` when both sides are the same library. Three other
snippets on that page had gone stale with it: `FFI_TableProvider::new` with
three arguments, `PyCapsule::new_bound`, and a receiving snippet whose variable
was named `codec`.
In `table-providers.md` all five `Registered with` cells now render
`Receiver.method`, so the schema row reads `Catalog.register_schema` rather
than a bare dotted path, with one sentence on reaching a `Catalog` first.
`Other session components` was in `functions.md`, where an optimizer rule and a
config struct are neither functions nor tables; it becomes its own page,
`other-components.md`, carrying the `extension_other_hooks` label so the index
rows still resolve.
Three guide pages named individual tests, which invites exactly the divergence
the reference is supposed to prevent. They name the suite now.
Finally the phase-one bundle hook. `__datafusion_session_extension__` reused
the name of the whole thing it is a hook on — `with_extensions` takes
extensions and `SessionExtensionExportable` is the bundle protocol — while its
sibling `__datafusion_session_planner__` is named for its content. It is now
`__datafusion_session_components__`, matching both its sibling and the
`SessionExtensionComponents` it returns, which leaves room for the UDF and
provider fields that will join the codec fields later. The protocol class
follows it to `SessionComponentsExportable`, since that file's convention is
one class per hook name. Neither name has shipped, so the upgrade guide needs
no before-and-after; it introduces both hooks as new in this release and names
the new one.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
0 commit comments