pub struct TextPlannerPlugin { /* private fields */ }Expand description
Text plugin planner hook, parameterized by the plugin config (the fingerprint rides every rewrite decision).
Implementations§
Source§impl TextPlannerPlugin
impl TextPlannerPlugin
Sourcepub fn new(config: TextPluginConfig) -> Self
pub fn new(config: TextPluginConfig) -> Self
Build from the validated plugin config.
Trait Implementations§
Source§impl Clone for TextPlannerPlugin
impl Clone for TextPlannerPlugin
Source§fn clone(&self) -> TextPlannerPlugin
fn clone(&self) -> TextPlannerPlugin
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for TextPlannerPlugin
impl Debug for TextPlannerPlugin
Source§impl PlannerPlugin for TextPlannerPlugin
impl PlannerPlugin for TextPlannerPlugin
Source§fn pins_through_optimizer(&self, expression: &Expression) -> bool
fn pins_through_optimizer(&self, expression: &Expression) -> bool
The conjuncts this plugin can turn into a text_scan candidate
producer. Evaluating a producer twice is never worthwhile: the
subject form joins the candidate literals back through the hexastore,
so a duplicate means re-scanning the predicate’s literal domain, and
the literal/string-function forms drain the index again.
Only the shapes the rewrites can actually seed are marked — a variable
haystack and a ground needle/pattern (parse_var_and_pattern,
parse_anchored_regex). The plan-level gates (index trust, the
predicate allowlist) are not visible here, so a marked conjunct can
still decline the rewrite and answer as a plain filter; a conjunct that
can never seed at all keeps the optimizer’s own pushdown instead.
Source§fn keeps_variable_when_ground(&self, expression: &Expression) -> bool
fn keeps_variable_when_ground(&self, expression: &Expression) -> bool
text:query needs its variable kept: both modes join the candidate set
back to it, and a fully ground call has no recognisable form (the
lowering would substitute the literal/IRI into the first argument). The
string functions are left on the default: grounded, they are exact
per-row predicates, and a rewrite would only add a candidate drain for a
single key.
Source§fn rewrite(
&self,
node: &mut PlanNode,
ctx: &QueryContext,
) -> Result<(), ComputeError>
fn rewrite( &self, node: &mut PlanNode, ctx: &QueryContext, ) -> Result<(), ComputeError>
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 TextPlannerPlugin
impl RefUnwindSafe for TextPlannerPlugin
impl Send for TextPlannerPlugin
impl Sync for TextPlannerPlugin
impl Unpin for TextPlannerPlugin
impl UnsafeUnpin for TextPlannerPlugin
impl UnwindSafe for TextPlannerPlugin
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSend for T
impl<T> DowncastSend for T
§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§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>
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§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
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>,
Layered].