Skip to content

Commit fe366d9

Browse files
timsaucerclaude
andcommitted
docs(context): trim codec docstrings, reference Exportable protocols
Drop prose restatement of the type union for `with_logical_extension_codec` and `with_physical_extension_codec`. Keep the dunder name (not visible from the type hint) and cross-link the `LogicalExtensionCodecExportable` / `PhysicalExtensionCodecExportable` protocols so Sphinx resolves them. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent d3a4af4 commit fe366d9

1 file changed

Lines changed: 6 additions & 8 deletions

File tree

python/datafusion/context.py

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1938,10 +1938,9 @@ def with_logical_extension_codec(
19381938
) -> SessionContext:
19391939
"""Create a new session context with specified codec.
19401940
1941-
This only supports codecs that have been implemented using the
1942-
FFI interface. ``codec`` must either be a raw ``FFI_LogicalExtensionCodec``
1943-
``PyCapsule`` or an object exposing
1944-
``__datafusion_logical_extension_codec__``.
1941+
Only FFI codecs are supported. Pass any object implementing
1942+
``__datafusion_logical_extension_codec__`` (see
1943+
:py:class:`~datafusion.user_defined.LogicalExtensionCodecExportable`).
19451944
"""
19461945
new_internal = self.ctx.with_logical_extension_codec(codec)
19471946
new = SessionContext.__new__(SessionContext)
@@ -1957,10 +1956,9 @@ def with_physical_extension_codec(
19571956
) -> SessionContext:
19581957
"""Create a new session context with the specified physical codec.
19591958
1960-
This only supports codecs that have been implemented using the
1961-
FFI interface. ``codec`` must either be a raw
1962-
``FFI_PhysicalExtensionCodec`` ``PyCapsule`` or an object exposing
1963-
``__datafusion_physical_extension_codec__``.
1959+
Only FFI codecs are supported. Pass any object implementing
1960+
``__datafusion_physical_extension_codec__`` (see
1961+
:py:class:`~datafusion.user_defined.PhysicalExtensionCodecExportable`).
19641962
"""
19651963
new_internal = self.ctx.with_physical_extension_codec(codec)
19661964
new = SessionContext.__new__(SessionContext)

0 commit comments

Comments
 (0)