Expand description
Rule-based and cost-aware operator-tree optimizer.
Walks an OperatorTree and applies the ten rewrite stages from
Theorem 6.1.2 (Paper 1) and Theorem 6.1.1 (Paper 2):
simplify_algebra– address-independent idempotence / absorption / empty elimination on membership-only Intersect / Union operands. Score-bearing operands remain distinct because posting-list merges add their scores.push_filters_down– sink Filter into Intersect children when the field applies.push_graph_pattern_filters– fold vertex / edge property filters into PatternMatch constraints.push_filter_into_traverse– absorb vertex predicates into Traverse so BFS prunes during expansion.push_filter_below_graph_join– move filters past graph joins when the field belongs to the left side.fuse_join_pattern– merge intersected PatternMatch operators that share a vertex variable.merge_vector_thresholds– collapse adjacent VectorSimilarity(q, t1) AND VectorSimilarity(q, t2) into a single VectorSimilarity(q, max(t1, t2)).reorder_intersect– sort Intersect children by estimated cardinality (cheapest first).reorder_fusion_signals– sort fusion signals by cost; graph operators receive a 0.5x discount when graph stats are available.apply_index_scan– substitute leaf Filter with IndexScan when a covering index is registered and cheaper.
Structs§
- Index
Scan Candidate - Query-local physical index candidate supplied by an engine catalog.
- Optimizer
Config - Fluent configuration for the optimizer pipeline. Lets callers disable individual stages for testing without poking at private fields.
- Query
Optimizer - Operator-tree query optimizer.