Repository navigation
Commit 7c86fb0
docs: split the FFI guide into one section per audience
`contributor-guide/ffi.md` had grown to 795 lines serving three different
readers at once, filed under a section whose index says it is for people
contributing to this repository. An engineer at delta-rs or a distributed-engine
vendor is neither a contributor nor an end user; they consume a published,
versioned protocol, and the only description of it lived behind a heading
telling them the page was not for them.
Adds a third top-level section, `extension-guide/`, so the sidebar reads User
Guide / Extension Guide / Contributor Guide — one per audience. It carries the
`(ffi)=` label, so every existing reference keeps resolving, including the
`:ref:`ffi`` inside `context.py`'s docstring that ships in the wheel.
The maintainer-facing rationale moves to `contributor-guide/ffi-internals.md`:
the weak-`Arc` scheme, why repairing an orphaned provider cannot work, why
planner codec rebinding is one level deep, and the two upstream issues. An
extension vendor should not be reading "that is a bug rather than a design, do
not copy the pattern" halfway down their integration guide.
The PyO3 `frozen` policy moves to `contributor-guide/pyo3-guidelines.md`. It is
project review policy with nothing to do with FFI, and extracting it repairs a
prose bug: it had been spliced into the middle of "Implementation Details", so
the sentence "If you were interfacing with a library that provided the above
`FFI_TableProvider`" resumed 46 lines after the snippet it referred to. Those
two halves are rejoined on `capsule-protocol.md`.
Fills the coverage gap the split exposed. The codebase exports 18 capsule
getters and the old page documented 7; the remaining 11 appeared on no page
that even listed them. The section index now carries a table of all 18, and
`table-providers.md` and `functions.md` document the catalog family, table
functions, physical optimizer rules, and extension options for the first time.
Corrects the argument rule while moving it. The old section asserted that
capsule getters "receive the SessionContext they are being installed on", which
is true for the codec, planner, and table-function hooks but not for the
catalog family: `CapsuleGetterArg::LogicalCodec` passes the host's logical
codec as a bare capsule, and `__datafusion_table_provider__` gets a session
from `SessionContext.register_table` but a codec capsule from
`Schema.register_table`. Nothing breaks, because every implementation passes
the argument to `ffi_logical_codec_from_pycapsule`, which handles both — so the
rule is now stated by capability rather than by type, and the upgrade guide
says which hooks changed.
Also converts the guide's five in-page heading links to labelled `{ref}`
targets, since heading anchors rot silently on rewording, and redirects the old
`contributor-guide/ffi.html` URL.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>1 parent 781e980 commit 7c86fb0
18 files changed
Lines changed: 1785 additions & 824 deletions
File tree
- docs/source
- contributor-guide
- extension-guide
- user-guide
- io
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| 69 | + | |
69 | 70 | | |
70 | 71 | | |
71 | 72 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
0 commit comments