pub struct JoinOrderAnalyzer { /* private fields */ }Expand description
Analyzes join chains and determines optimal join ordering
Implementations§
Source§impl JoinOrderAnalyzer
impl JoinOrderAnalyzer
Sourcepub fn with_column_map(column_to_table: HashMap<String, String>) -> Self
pub fn with_column_map(column_to_table: HashMap<String, String>) -> Self
Create a new join order analyzer with schema-based column resolution
Sourcepub fn set_column_map(&mut self, column_to_table: HashMap<String, String>)
pub fn set_column_map(&mut self, column_to_table: HashMap<String, String>)
Set the column-to-table mapping for schema-based resolution
Sourcepub fn register_tables(&mut self, table_names: Vec<String>)
pub fn register_tables(&mut self, table_names: Vec<String>)
Register all tables involved in the query
Sourcepub fn analyze_predicate(&mut self, expr: &Expression, tables: &HashSet<String>)
pub fn analyze_predicate(&mut self, expr: &Expression, tables: &HashSet<String>)
Analyze a predicate and extract join edges or local predicates
Sourcepub fn analyze_predicate_with_type(
&mut self,
expr: &Expression,
tables: &HashSet<String>,
join_type: JoinType,
)
pub fn analyze_predicate_with_type( &mut self, expr: &Expression, tables: &HashSet<String>, join_type: JoinType, )
Analyze a predicate with an explicit join type
Sourcepub fn find_most_selective_tables(&self) -> Vec<String>
pub fn find_most_selective_tables(&self) -> Vec<String>
Find all tables that have local predicates (highest selectivity filters)
Sourcepub fn build_join_chain(&self, seed_table: &str) -> Vec<String>
pub fn build_join_chain(&self, seed_table: &str) -> Vec<String>
Build a join chain starting from a seed table Returns list of tables in optimal join order
Sourcepub fn find_optimal_order(&self) -> Vec<String>
pub fn find_optimal_order(&self) -> Vec<String>
Find optimal join order given all constraints
Uses heuristic: start with most selective local filters, then follow equijoin chains
Trait Implementations§
Source§impl Clone for JoinOrderAnalyzer
impl Clone for JoinOrderAnalyzer
Source§fn clone(&self) -> JoinOrderAnalyzer
fn clone(&self) -> JoinOrderAnalyzer
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for JoinOrderAnalyzer
impl Debug for JoinOrderAnalyzer
Auto Trait Implementations§
impl Freeze for JoinOrderAnalyzer
impl RefUnwindSafe for JoinOrderAnalyzer
impl Send for JoinOrderAnalyzer
impl Sync for JoinOrderAnalyzer
impl Unpin for JoinOrderAnalyzer
impl UnwindSafe for JoinOrderAnalyzer
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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