Skip to content

Commit 9bc07aa

Browse files
committed
docs: restore version-byte and cloudpickle-cache rustdoc wording
Two codec.rs docstrings were reworded in PR4 in ways that dropped information: * try_encode_python_scalar_udf: restore the `DFPYUDF` family prefix + version byte description of the payload framing (PR4 had collapsed it to `DFPYUDF1` prefix, dropping the version-byte mention). * cloudpickle cached-handle comment: restore "The encode/decode helpers above" wording.
1 parent 02bc690 commit 9bc07aa

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

crates/core/src/codec.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -568,10 +568,10 @@ impl PhysicalExtensionCodec for PythonPhysicalCodec {
568568
// =============================================================================
569569

570570
/// Encode a Python scalar UDF inline if `node` is one. Returns
571-
/// `Ok(true)` when the payload (`DFPYUDF1` prefix + cloudpickled
572-
/// tuple) was written and the caller should skip its inner codec.
573-
/// Returns `Ok(false)` for any non-Python UDF, signalling the caller
574-
/// to delegate to its `inner`.
571+
/// `Ok(true)` when the payload (`DFPYUDF` family prefix, version byte,
572+
/// cloudpickled tuple) was written and the caller should skip its
573+
/// inner codec. Returns `Ok(false)` for any non-Python UDF, signalling
574+
/// the caller to delegate to its `inner`.
575575
pub(crate) fn try_encode_python_scalar_udf(node: &ScalarUDF, buf: &mut Vec<u8>) -> Result<bool> {
576576
let Some(py_udf) = node.inner().downcast_ref::<PythonFunctionScalarUDF>() else {
577577
return Ok(false);
@@ -811,7 +811,7 @@ fn read_framed_payload<'a>(
811811

812812
/// Cached handle to the `cloudpickle` module.
813813
///
814-
/// Six encode/decode helpers below would otherwise re-resolve the
814+
/// The encode/decode helpers above would otherwise re-resolve the
815815
/// module on every call. `py.import` is backed by `sys.modules` and
816816
/// therefore cheap, but each call still walks a dict and re-binds the
817817
/// result; a plan with many Python UDFs pays that cost per UDF.

0 commit comments

Comments
 (0)