pub fn require_proto_field<T>(
opt: Option<T>,
expr_name: &str,
field: &str,
) -> Result<T>Available on crate feature
proto only.Expand description
Unwrap a required non-expression proto field.
Mirrors PhysicalExprDecodeCtx::decode_required_expression for proto
fields that aren’t PhysicalExprNodes — e.g. the arrow_type of a
PhysicalCastNode or the scalar of a PhysicalLiteralNode. Keeps
the “missing required field” message format identical across
expressions:
ⓘ
let arrow_type = require_proto_field(
cast_expr.arrow_type.as_ref(),
"CastExpr",
"arrow_type",
)?;