(extension_checklist)=
The rules in this section, gathered into one list to run through before you publish. Each links to the page that explains it.
__datafusion_<thing>__ returns a capsule named datafusion_<thing>. → {ref}extension_capsule_protocolffi_logical_codec_from_pycapsule and move on. It is not always a session, and when it is, it is not the Python SessionContext wrapper. → {ref}extension_getter_argumentSessionContext inside your library. Take what the FFI constructors need off the argument you were handed. A context built inline is already dropped by the time the capsule is used. → {ref}extension_getter_argumentdatafusion-python crate. → {ref}extension_why_ffiextension_codec_order__datafusion_codec_id__ if you might rename the class. The default id is the exporting class's import path, so a rename stops older plans decoding. → {ref}extension_codec_idsname before trusting buf. An empty payload has no id to route on, so your try_decode_udf can be called with another library's function name and an empty buffer. → {ref}extension_codecsextension_codec_orderextension_codec_provider_logicalextension_codec_durable_metadataextension_bundlesextension_bundleswith_extensions refuses a capsule, because there would be nothing to name the codec by. → {ref}extension_bundles_codecs_are_objectsfallback and delegates to it. Ignoring it replaces every layer beneath you, which is legal but not composable — unless your planner rewrites the plan, as in the next item. → {ref}extension_bundlesfallback unused. The two are exclusive: delegating hands planning back to the host and returns nodes you can neither downcast nor split. Planning for yourself then means supplying your own optimizer rules, because a session that arrived over FFI carries the host's. → {ref}planner_host_optimizer_rulesNone, not fallback, when it has nothing to contribute. Returning fallback installs the session's own planner as a foreign one and adds an FFI hop that was not there. → {ref}extension_bundlesextension_bundles_two_phasesplanner_codec_rebindingdatafusion version your release requires. A mismatch raises an ImportError on import, which is a good failure — but only if your users know what to install. → {ref}extension_version_mismatchextension_sessionsextension_codec_durable_metadataexamples/distributed additionally spawns worker processes, which is the only way to catch a codec that only works in the process that wrote it.SessionContext cannot be snapshotted and restored elsewhere, so every one of them is somebody's job, and your users cannot tell whose from the outside. → {ref}distributed_worker_parity