Available on crate feature
proto only.Expand description
Decode-side counterpart to proto_encode.
Expression authors implement an associated try_from_proto on their
concrete type, with the signature
ⓘ
fn try_from_proto(
node: &PhysicalExprNode,
ctx: &PhysicalExprDecodeCtx<'_>,
) -> Result<Arc<dyn PhysicalExpr>>It takes the whole PhysicalExprNode — the exact inverse of what
PhysicalExpr::try_to_proto returns — so the constructor can also see
outer-node fields such as expr_id. The central match in
datafusion-proto dispatches ExprType variants to these constructors.
As with the encode side, the public surface is a struct (not a &dyn
trait) so future fields/helpers (registries for third-party expressions,
schema-resolution caches, etc.) can be added without changing the
signature every expression depends on.
Macros§
- expect_
expr_ variant - Open the outer
PhysicalExprNodeand assert it carries the expectedExprTypevariant, returning the inner payload (auto-derefs throughBox) or bailing with anInternalerror.
Structs§
- Physical
Expr Decode Ctx - Decoder context handed to per-expression
try_from_protoconstructors.
Traits§
- Physical
Expr Decode - Internal dispatch trait. Implementors live in
datafusion-proto. Expression authors should usePhysicalExprDecodeCtxinstead of calling this directly.
Functions§
- require_
proto_ field - Unwrap a required non-expression proto field.