pub struct ExecutionPlanEncodeCtx<'a> { /* private fields */ }proto only.Expand description
Context handed to ExecutionPlan::try_to_proto.
Provides the primitives a plan needs to serialize its children and
expressions without naming datafusion-proto.
Implementations§
Source§impl<'a> ExecutionPlanEncodeCtx<'a>
impl<'a> ExecutionPlanEncodeCtx<'a>
Sourcepub fn new(encoder: &'a dyn ExecutionPlanEncode) -> Self
pub fn new(encoder: &'a dyn ExecutionPlanEncode) -> Self
Create a new encode context wrapping an [ExecutionPlanEncode]
implementation (supplied by datafusion-proto).
Sourcepub fn encode_child(
&self,
plan: &Arc<dyn ExecutionPlan>,
) -> Result<PhysicalPlanNode>
pub fn encode_child( &self, plan: &Arc<dyn ExecutionPlan>, ) -> Result<PhysicalPlanNode>
Serialize a single child plan.
Sourcepub fn encode_children<'b, I>(&self, plans: I) -> Result<Vec<PhysicalPlanNode>>
pub fn encode_children<'b, I>(&self, plans: I) -> Result<Vec<PhysicalPlanNode>>
Serialize an iterator of child plans.
Sourcepub fn encode_expr(
&self,
expr: &Arc<dyn PhysicalExpr>,
) -> Result<PhysicalExprNode>
pub fn encode_expr( &self, expr: &Arc<dyn PhysicalExpr>, ) -> Result<PhysicalExprNode>
Serialize a single physical expression.
Sourcepub fn encode_expressions<'b, I>(
&self,
exprs: I,
) -> Result<Vec<PhysicalExprNode>>
pub fn encode_expressions<'b, I>( &self, exprs: I, ) -> Result<Vec<PhysicalExprNode>>
Serialize an iterator of physical expressions.
Sourcepub fn encode_udf(&self, udf: &ScalarUDF) -> Result<Option<Vec<u8>>>
pub fn encode_udf(&self, udf: &ScalarUDF) -> Result<Option<Vec<u8>>>
Serialize a scalar UDF to an opaque payload (None = built-in, decodable
by name). No proto types cross this boundary.
Sourcepub fn encode_udaf(&self, udaf: &AggregateUDF) -> Result<Option<Vec<u8>>>
pub fn encode_udaf(&self, udaf: &AggregateUDF) -> Result<Option<Vec<u8>>>
Serialize an aggregate UDF to an opaque payload (None = decodable by
name).
Sourcepub fn encode_udwf(&self, udwf: &WindowUDF) -> Result<Option<Vec<u8>>>
pub fn encode_udwf(&self, udwf: &WindowUDF) -> Result<Option<Vec<u8>>>
Serialize a window UDF to an opaque payload (None = decodable by name).
Sourcepub fn expr_ctx(&self) -> PhysicalExprEncodeCtx<'_>
pub fn expr_ctx(&self) -> PhysicalExprEncodeCtx<'_>
An expression-level encode context backed by this plan context.
Lets a plan hand ctx to expression-level conversions that own their own
wire logic — e.g.
Partitioning::try_to_proto
and
PhysicalSortExpr::try_to_proto.
Trait Implementations§
Source§impl PhysicalExprEncode for ExecutionPlanEncodeCtx<'_>
Lets ExecutionPlanEncodeCtx back a PhysicalExprEncodeCtx, so
expression-level conversions can be reused from plan hooks.
impl PhysicalExprEncode for ExecutionPlanEncodeCtx<'_>
Lets ExecutionPlanEncodeCtx back a PhysicalExprEncodeCtx, so
expression-level conversions can be reused from plan hooks.
Source§fn encode(&self, expr: &Arc<dyn PhysicalExpr>) -> Result<PhysicalExprNode>
fn encode(&self, expr: &Arc<dyn PhysicalExpr>) -> Result<PhysicalExprNode>
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for ExecutionPlanEncodeCtx<'a>
impl<'a> !Send for ExecutionPlanEncodeCtx<'a>
impl<'a> !Sync for ExecutionPlanEncodeCtx<'a>
impl<'a> !UnwindSafe for ExecutionPlanEncodeCtx<'a>
impl<'a> Freeze for ExecutionPlanEncodeCtx<'a>
impl<'a> Unpin for ExecutionPlanEncodeCtx<'a>
impl<'a> UnsafeUnpin for ExecutionPlanEncodeCtx<'a>
Blanket Implementations§
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
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