Skip to content

Commit 16756f1

Browse files
timsaucerclaude
andcommitted
docs: clarify with_python_udf_inlining enabled arg is required
Reword docstring to drop misleading "(the default)" claim. The `enabled` parameter is keyword-only and required — there is no argument default. Note instead that fresh sessions inline UDFs until the toggle overrides them (a session-level default, not an argument default). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent bcc4755 commit 16756f1

1 file changed

Lines changed: 9 additions & 5 deletions

File tree

python/datafusion/context.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1773,12 +1773,16 @@ def with_physical_extension_codec(self, codec: Any) -> SessionContext:
17731773
def with_python_udf_inlining(self, *, enabled: bool) -> SessionContext:
17741774
"""Control whether Python UDFs are embedded in serialized expressions.
17751775
1776-
When ``enabled=True`` (the default), serialized expressions carry
1777-
the Python code for any scalar, aggregate, or window UDFs they
1778-
reference. The receiver rebuilds the UDFs from those bytes and
1779-
does not need to register them first.
1776+
``enabled`` is keyword-only and required: callers must pick a
1777+
mode explicitly. Fresh sessions inline UDFs (``enabled=True``
1778+
behavior) until this method overrides the toggle.
17801779
1781-
When ``enabled=False``, serialized expressions store only the
1780+
With ``enabled=True``, serialized expressions carry the Python
1781+
code for any scalar, aggregate, or window UDFs they reference.
1782+
The receiver rebuilds the UDFs from those bytes and does not
1783+
need to register them first.
1784+
1785+
With ``enabled=False``, serialized expressions store only the
17821786
UDF names. This has two uses:
17831787
17841788
* **Cross-language portability.** The bytes can be decoded by a

0 commit comments

Comments
 (0)