pub struct PythonPhysicalCodec { /* private fields */ }Expand description
PhysicalExtensionCodec mirror of PythonLogicalCodec parked
on the same SessionContext. Carries the Python-aware encoding
hooks for physical-layer types (ExecutionPlan, PhysicalExpr)
and delegates the rest to inner.
The PhysicalExtensionCodec trait has its own try_encode_udf
/ try_decode_udf pair distinct from the logical one, so a
ScalarUDF referenced inside a physical plan needs Python-aware
encoding on this layer too — otherwise a plan with a Python UDF
would round-trip at the logical level but break at the physical
level. Both layers reuse the shared payload framing
([PY_SCALAR_UDF_FAMILY] et al.) so the wire format is identical.
Implementations§
Source§impl PythonPhysicalCodec
impl PythonPhysicalCodec
pub fn new(inner: Arc<dyn PhysicalExtensionCodec>) -> Self
pub fn inner(&self) -> &Arc<dyn PhysicalExtensionCodec> ⓘ
Sourcepub fn with_python_udf_inlining(self, enabled: bool) -> Self
pub fn with_python_udf_inlining(self, enabled: bool) -> Self
Toggle inline encoding of Python UDFs on this physical codec.
Mirrors PythonLogicalCodec::with_python_udf_inlining; see
that method for the full security and portability discussion.
pub fn python_udf_inlining(&self) -> bool
Trait Implementations§
Source§impl Debug for PythonPhysicalCodec
impl Debug for PythonPhysicalCodec
Source§impl Default for PythonPhysicalCodec
impl Default for PythonPhysicalCodec
Source§impl PhysicalExtensionCodec for PythonPhysicalCodec
impl PhysicalExtensionCodec for PythonPhysicalCodec
fn try_decode( &self, buf: &[u8], inputs: &[Arc<dyn ExecutionPlan>], ctx: &TaskContext, ) -> Result<Arc<dyn ExecutionPlan>>
fn try_encode( &self, node: Arc<dyn ExecutionPlan>, buf: &mut Vec<u8>, ) -> Result<()>
fn try_encode_udf(&self, node: &ScalarUDF, buf: &mut Vec<u8>) -> Result<()>
fn try_decode_udf(&self, name: &str, buf: &[u8]) -> Result<Arc<ScalarUDF>>
fn try_encode_expr( &self, node: &Arc<dyn PhysicalExpr>, buf: &mut Vec<u8>, ) -> Result<()>
fn try_decode_expr( &self, buf: &[u8], inputs: &[Arc<dyn PhysicalExpr>], ) -> Result<Arc<dyn PhysicalExpr>>
fn try_encode_udaf(&self, node: &AggregateUDF, buf: &mut Vec<u8>) -> Result<()>
fn try_decode_udaf(&self, name: &str, buf: &[u8]) -> Result<Arc<AggregateUDF>>
fn try_encode_udwf(&self, node: &WindowUDF, buf: &mut Vec<u8>) -> Result<()>
fn try_decode_udwf(&self, name: &str, buf: &[u8]) -> Result<Arc<WindowUDF>>
Auto Trait Implementations§
impl !RefUnwindSafe for PythonPhysicalCodec
impl !UnwindSafe for PythonPhysicalCodec
impl Freeze for PythonPhysicalCodec
impl Send for PythonPhysicalCodec
impl Sync for PythonPhysicalCodec
impl Unpin for PythonPhysicalCodec
impl UnsafeUnpin for PythonPhysicalCodec
Blanket Implementations§
Source§impl<Source> AccessAs for Source
impl<Source> AccessAs for Source
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more