pub struct GeoPlannerPlugin;Expand description
GeoSPARQL planner hook.
Trait Implementations§
Source§impl Debug for GeoPlannerPlugin
impl Debug for GeoPlannerPlugin
Source§impl Default for GeoPlannerPlugin
impl Default for GeoPlannerPlugin
Source§fn default() -> GeoPlannerPlugin
fn default() -> GeoPlannerPlugin
Returns the “default value” for a type. Read more
Source§impl PlannerPlugin for GeoPlannerPlugin
impl PlannerPlugin for GeoPlannerPlugin
Source§fn pins_through_optimizer(&self, expression: &Expression) -> bool
fn pins_through_optimizer(&self, expression: &Expression) -> bool
A geof:sf* comparison this plugin can turn into a geo_scan
candidate producer. A producer built twice would drain the S2 covering
again and re-join it into the plan, so it is pinned across the algebra
optimizer. The test is syntactic: a conjunct that is pinned but left
unrewritten (untrusted index, non-native geometry) stays an ordinary
filter at its binding-site ancestor.
Source§fn keeps_variable_when_ground(&self, expression: &Expression) -> bool
fn keeps_variable_when_ground(&self, expression: &Expression) -> bool
The geo rewrite joins the covered geometry back to the filtered
variable, so grounding that variable would leave a per-row relate
instead of a geo_scan joining the candidate set. Same conjunct set as
Self::pins_through_optimizer, shared through
[is_geo_scan_conjunct] so the two answers cannot drift.
Source§fn rewrite(
&self,
node: &mut PlanNode,
ctx: &QueryContext,
) -> Result<(), ComputeError>
fn rewrite( &self, node: &mut PlanNode, ctx: &QueryContext, ) -> Result<(), ComputeError>
Walk
node in place. ctx carries the running query’s view of the
store — MVCC snapshot, engine knobs — so a plugin can gate an
index-only rewrite on index freshness (the geo plugin skips its
rewrite below the persisted geo-index rebuild epoch). Geo inspects
PlanNode::Filter::residual conjuncts and recurses into inner plans
and EXISTS clause bodies; repeat executions of the injected childless
op are covered by the query-local CustomOp memo. Must not drop rows
unless the injected op is a complete implementation of every stripped
conjunct.Auto Trait Implementations§
impl Freeze for GeoPlannerPlugin
impl RefUnwindSafe for GeoPlannerPlugin
impl Send for GeoPlannerPlugin
impl Sync for GeoPlannerPlugin
impl Unpin for GeoPlannerPlugin
impl UnsafeUnpin for GeoPlannerPlugin
impl UnwindSafe for GeoPlannerPlugin
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
Mutably borrows from an owned value. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
Converts
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>
Converts
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§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Applies the layer to a service and wraps it in [
Layered].