pub struct ExprLowerer<'a> { /* private fields */ }Expand description
Implementations§
Source§impl<'a> ExprLowerer<'a>
impl<'a> ExprLowerer<'a>
Sourcepub fn new(
arena: &'a ExprArena,
ontology: Option<&'a OntologyHandle>,
var_map: &'a VarMap,
) -> Self
pub fn new( arena: &'a ExprArena, ontology: Option<&'a OntologyHandle>, var_map: &'a VarMap, ) -> Self
Creates a new lowerer, building the PropId → name map from the
ontology only (empty in exploratory mode).
arena: the expression arena from the [GraphPlan] being lowered.ontology: the ontology handle, if one is loaded (may beNonein exploratory mode).var_map: maps variable IDs to DataFusion column name strings.
Prefer with_prop_names when the caller has a
map that also covers runtime-catalog (exploratory) property names.
Sourcepub fn with_prop_names(
arena: &'a ExprArena,
var_map: &'a VarMap,
prop_names: HashMap<u32, String>,
) -> Self
pub fn with_prop_names( arena: &'a ExprArena, var_map: &'a VarMap, prop_names: HashMap<u32, String>, ) -> Self
Creates a lowerer with a prebuilt PropId → name map.
The GraphPlanLowerer builds the map once
(merging ontology + runtime catalog) and clones it into each
per-operator ExprLowerer (the maps are small).
Sourcepub fn with_prop_names_and_nodes(
arena: &'a ExprArena,
var_map: &'a VarMap,
prop_names: HashMap<u32, String>,
node_shapes: HashMap<u32, NodeShape>,
type_id_to_entity_name: HashMap<u32, String>,
props_authoritative: bool,
) -> Self
pub fn with_prop_names_and_nodes( arena: &'a ExprArena, var_map: &'a VarMap, prop_names: HashMap<u32, String>, node_shapes: HashMap<u32, NodeShape>, type_id_to_entity_name: HashMap<u32, String>, props_authoritative: bool, ) -> Self
Like with_prop_names but also seeded with the
VarId.0 → NodeShape map for bare-node-value materialization (#785).
props_authoritative is true when node_shapes’ property lists come from
a real backing dataset (so an absent property is genuinely absent → null,
#598); pass false for schema-only / explain lowering. See the field docs.
Sourcepub fn with_input_schema(self, schema: DFSchemaRef) -> Self
pub fn with_input_schema(self, schema: DFSchemaRef) -> Self
Attach the input plan’s schema so a relational op’s PropertyAccess can
resolve a temporal-component accessor (d.year) by the base column’s
Arrow type (ADR 0009 / #920).
Sourcepub fn with_elem_struct_col(self, col: String) -> Self
pub fn with_elem_struct_col(self, col: String) -> Self
Push col onto the chain of synthetic per-element columns in scope, so
a PropertyAccess on it lowers via struct-aware get_field rather than
a dotted property-column name (#1004). Called once per enclosing loop,
outermost first, so nested loops keep distinct bindings (#1021).
Sourcepub fn with_read_target(self, dir: PathBuf) -> Self
pub fn with_read_target(self, dir: PathBuf) -> Self
Attach the project directory for read-side lowering, so nodes(p) bakes
a hydrating cypher_path_nodes (labels + property union, #1024).
Sourcepub fn lower(&self, id: ExprId) -> Result<DfExpr, LoweringError>
pub fn lower(&self, id: ExprId) -> Result<DfExpr, LoweringError>
Lower the expression identified by id to a DataFusion [Expr].
§Errors
Returns LoweringError if a variable is unbound, a function is
unknown, or an expression variant is not yet supported.
Auto Trait Implementations§
impl<'a> !Freeze for ExprLowerer<'a>
impl<'a> RefUnwindSafe for ExprLowerer<'a>
impl<'a> Send for ExprLowerer<'a>
impl<'a> Sync for ExprLowerer<'a>
impl<'a> Unpin for ExprLowerer<'a>
impl<'a> UnsafeUnpin for ExprLowerer<'a>
impl<'a> UnwindSafe for ExprLowerer<'a>
Blanket Implementations§
impl<T> Allocation for T
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> 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