pub struct ExecutionPlanDecodeCtx<'a> { /* private fields */ }proto only.Expand description
Context handed to a plan’s try_from_proto associated function.
Provides the primitives a plan needs to deserialize its children and
expressions without naming datafusion-proto.
Implementations§
Source§impl<'a> ExecutionPlanDecodeCtx<'a>
impl<'a> ExecutionPlanDecodeCtx<'a>
Sourcepub fn new(decoder: &'a dyn ExecutionPlanDecode) -> Self
pub fn new(decoder: &'a dyn ExecutionPlanDecode) -> Self
Create a new decode context wrapping an [ExecutionPlanDecode]
implementation (supplied by datafusion-proto).
Sourcepub fn decode_child(
&self,
node: &PhysicalPlanNode,
) -> Result<Arc<dyn ExecutionPlan>>
pub fn decode_child( &self, node: &PhysicalPlanNode, ) -> Result<Arc<dyn ExecutionPlan>>
Deserialize a single child plan.
Sourcepub fn decode_child_with_scalar_subquery_results(
&self,
node: &PhysicalPlanNode,
results: ScalarSubqueryResults,
) -> Result<Arc<dyn ExecutionPlan>>
pub fn decode_child_with_scalar_subquery_results( &self, node: &PhysicalPlanNode, results: ScalarSubqueryResults, ) -> Result<Arc<dyn ExecutionPlan>>
Deserialize a child plan with results active for scalar subquery
expressions in that plan’s subtree.
Sourcepub fn decode_required_child(
&self,
node: Option<&PhysicalPlanNode>,
plan_name: &str,
field: &str,
) -> Result<Arc<dyn ExecutionPlan>>
pub fn decode_required_child( &self, node: Option<&PhysicalPlanNode>, plan_name: &str, field: &str, ) -> Result<Arc<dyn ExecutionPlan>>
Deserialize a required child plan, producing a uniform “missing required field” error when the optional wire field is absent.
Sourcepub fn decode_expr(
&self,
node: &PhysicalExprNode,
input_schema: &Schema,
) -> Result<Arc<dyn PhysicalExpr>>
pub fn decode_expr( &self, node: &PhysicalExprNode, input_schema: &Schema, ) -> Result<Arc<dyn PhysicalExpr>>
Deserialize a physical expression against input_schema.
Sourcepub fn decode_required_expr(
&self,
node: Option<&PhysicalExprNode>,
input_schema: &Schema,
plan_name: &str,
field: &str,
) -> Result<Arc<dyn PhysicalExpr>>
pub fn decode_required_expr( &self, node: Option<&PhysicalExprNode>, input_schema: &Schema, plan_name: &str, field: &str, ) -> Result<Arc<dyn PhysicalExpr>>
Deserialize a required physical expression against input_schema.
Sourcepub fn task_ctx(&self) -> &TaskContext
pub fn task_ctx(&self) -> &TaskContext
The session task context (function registry + session config). Never exposes the proto extension codec.
Sourcepub fn decode_udf(
&self,
name: &str,
payload: Option<&[u8]>,
) -> Result<Arc<ScalarUDF>>
pub fn decode_udf( &self, name: &str, payload: Option<&[u8]>, ) -> Result<Arc<ScalarUDF>>
Reconstruct a scalar UDF from its name and optional payload. The
lookup-order policy is owned by datafusion-proto; no proto types cross
this boundary.
Sourcepub fn decode_udaf(
&self,
name: &str,
payload: Option<&[u8]>,
) -> Result<Arc<AggregateUDF>>
pub fn decode_udaf( &self, name: &str, payload: Option<&[u8]>, ) -> Result<Arc<AggregateUDF>>
Reconstruct an aggregate UDF from its name and optional payload.
Sourcepub fn decode_udwf(
&self,
name: &str,
payload: Option<&[u8]>,
) -> Result<Arc<WindowUDF>>
pub fn decode_udwf( &self, name: &str, payload: Option<&[u8]>, ) -> Result<Arc<WindowUDF>>
Reconstruct a window UDF from its name and optional payload.
Sourcepub fn expr_ctx<'s>(
&'s self,
input_schema: &'s Schema,
) -> PhysicalExprDecodeCtx<'s>
pub fn expr_ctx<'s>( &'s self, input_schema: &'s Schema, ) -> PhysicalExprDecodeCtx<'s>
An expression-level decode context backed by this plan context, bound to
input_schema.
The decode counterpart of
ExecutionPlanEncodeCtx::expr_ctx, for calling conversions such as
Partitioning::try_from_proto.
Trait Implementations§
Source§impl PhysicalExprDecode for ExecutionPlanDecodeCtx<'_>
Lets ExecutionPlanDecodeCtx back a PhysicalExprDecodeCtx, so
expression-level conversions can be reused from plan hooks.
impl PhysicalExprDecode for ExecutionPlanDecodeCtx<'_>
Lets ExecutionPlanDecodeCtx back a PhysicalExprDecodeCtx, so
expression-level conversions can be reused from plan hooks.
Source§fn decode(
&self,
node: &PhysicalExprNode,
schema: &Schema,
) -> Result<Arc<dyn PhysicalExpr>>
fn decode( &self, node: &PhysicalExprNode, schema: &Schema, ) -> Result<Arc<dyn PhysicalExpr>>
PhysicalExpr. The schema is
passed alongside so implementations can support recursive children
and rebind the context per call (e.g. for nested plans).Auto Trait Implementations§
impl<'a> !RefUnwindSafe for ExecutionPlanDecodeCtx<'a>
impl<'a> !Send for ExecutionPlanDecodeCtx<'a>
impl<'a> !Sync for ExecutionPlanDecodeCtx<'a>
impl<'a> !UnwindSafe for ExecutionPlanDecodeCtx<'a>
impl<'a> Freeze for ExecutionPlanDecodeCtx<'a>
impl<'a> Unpin for ExecutionPlanDecodeCtx<'a>
impl<'a> UnsafeUnpin for ExecutionPlanDecodeCtx<'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