pub struct QueryAnalyzer {
pub enable_type_inference: bool,
/* private fields */
}Expand description
Query analyzer
Fields§
§enable_type_inference: boolWhether to enable type inference
Implementations§
Source§impl QueryAnalyzer
impl QueryAnalyzer
Sourcepub fn with_statistics(statistics: StatisticsCollector) -> Self
pub fn with_statistics(statistics: StatisticsCollector) -> Self
Create analyzer with statistics collector
Sourcepub fn with_cost_model(cost_model: CostModel) -> Self
pub fn with_cost_model(cost_model: CostModel) -> Self
Create analyzer with cost model
Sourcepub fn with_statistics_and_cost_model(
statistics: StatisticsCollector,
cost_model: CostModel,
) -> Self
pub fn with_statistics_and_cost_model( statistics: StatisticsCollector, cost_model: CostModel, ) -> Self
Create analyzer with both statistics and cost model
Sourcepub fn analyze_query(&self, algebra: &Algebra) -> Result<QueryAnalysis>
pub fn analyze_query(&self, algebra: &Algebra) -> Result<QueryAnalysis>
Analyze a query and return comprehensive analysis results
Sourcepub fn analyze(&self, algebra: &Algebra) -> Result<QueryAnalysis>
pub fn analyze(&self, algebra: &Algebra) -> Result<QueryAnalysis>
Alias for analyze_query for backward compatibility
Sourcepub fn add_index(&mut self, _predicate: &str, _index_type: IndexType)
pub fn add_index(&mut self, _predicate: &str, _index_type: IndexType)
Add index information for optimization (placeholder implementation)
Sourcepub fn estimate_pattern_cardinality(&self, pattern: &TriplePattern) -> usize
pub fn estimate_pattern_cardinality(&self, pattern: &TriplePattern) -> usize
Estimate pattern cardinality based on bound terms
Sourcepub fn estimate_pattern_cardinalities(
&self,
algebra: &Algebra,
) -> HashMap<usize, usize>
pub fn estimate_pattern_cardinalities( &self, algebra: &Algebra, ) -> HashMap<usize, usize>
Estimate pattern cardinalities for all patterns
Sourcepub fn identify_join_variables_simplified(
&self,
algebra: &Algebra,
) -> Result<HashSet<Variable>>
pub fn identify_join_variables_simplified( &self, algebra: &Algebra, ) -> Result<HashSet<Variable>>
Identify join variables in simplified form (returns HashSet)
Sourcepub fn analyze_filter_safety_structured(
&self,
algebra: &Algebra,
) -> Result<FilterSafetyAnalysis>
pub fn analyze_filter_safety_structured( &self, algebra: &Algebra, ) -> Result<FilterSafetyAnalysis>
Analyze filter safety and return structured results
Sourcepub fn discover_variables(&self, algebra: &Algebra) -> Result<HashSet<Variable>>
pub fn discover_variables(&self, algebra: &Algebra) -> Result<HashSet<Variable>>
Discover all variables in the algebra expression
Sourcepub fn extract_projected_variables(
&self,
algebra: &Algebra,
) -> HashSet<Variable>
pub fn extract_projected_variables( &self, algebra: &Algebra, ) -> HashSet<Variable>
Extract variables that appear in projection
Sourcepub fn extract_filter_variables(&self, algebra: &Algebra) -> HashSet<Variable>
pub fn extract_filter_variables(&self, algebra: &Algebra) -> HashSet<Variable>
Extract variables that appear in filters
Sourcepub fn identify_join_variables(
&self,
algebra: &Algebra,
) -> Result<HashMap<Variable, Vec<usize>>>
pub fn identify_join_variables( &self, algebra: &Algebra, ) -> Result<HashMap<Variable, Vec<usize>>>
Identify variables that join patterns together
Sourcepub fn analyze_variable_scopes(
&self,
algebra: &Algebra,
) -> Result<HashMap<Variable, VariableScope>>
pub fn analyze_variable_scopes( &self, algebra: &Algebra, ) -> Result<HashMap<Variable, VariableScope>>
Analyze variable scoping
Sourcepub fn analyze_filter_safety(
&self,
algebra: &Algebra,
) -> Result<Vec<(Expression, FilterSafety)>>
pub fn analyze_filter_safety( &self, algebra: &Algebra, ) -> Result<Vec<(Expression, FilterSafety)>>
Analyze filter safety
Sourcepub fn analyze_type_consistency(
&self,
algebra: &Algebra,
) -> Result<TypeConsistencyAnalysis>
pub fn analyze_type_consistency( &self, algebra: &Algebra, ) -> Result<TypeConsistencyAnalysis>
Analyze type consistency
Sourcepub fn generate_index_hints(
&self,
algebra: &Algebra,
) -> Result<IndexOptimizationHints>
pub fn generate_index_hints( &self, algebra: &Algebra, ) -> Result<IndexOptimizationHints>
Generate index optimization hints
Sourcepub fn validate_semantics(
&self,
algebra: &Algebra,
) -> Result<Vec<ValidationError>>
pub fn validate_semantics( &self, algebra: &Algebra, ) -> Result<Vec<ValidationError>>
Validate query semantics
Trait Implementations§
Source§impl Clone for QueryAnalyzer
impl Clone for QueryAnalyzer
Source§fn clone(&self) -> QueryAnalyzer
fn clone(&self) -> QueryAnalyzer
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for QueryAnalyzer
impl Debug for QueryAnalyzer
Auto Trait Implementations§
impl Freeze for QueryAnalyzer
impl RefUnwindSafe for QueryAnalyzer
impl Send for QueryAnalyzer
impl Sync for QueryAnalyzer
impl Unpin for QueryAnalyzer
impl UnsafeUnpin for QueryAnalyzer
impl UnwindSafe for QueryAnalyzer
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§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.Source§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.Source§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.Source§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.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
impl<T> Fruit for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.