Expand description
Predicate pushdown and index-aware query routing.
Routes WHERE predicates to the most selective execution path: UID index lookup → BTree prefix scan → JSON FTS → Lance columnar filter → residual. Includes SQL injection prevention for LIKE patterns (CWE-89) and UID validation (CWE-345).
Structs§
- Index
Aware Analyzer - Analyzer that considers available indexes when categorizing predicates.
- Lance
Filter Generator - Converts pushable predicates to Lance SQL filter strings.
- Predicate
Analysis - Split result of predicate analysis: pushable vs residual.
- Predicate
Analyzer - Classifies predicates as pushable to Lance or residual (post-scan).
- Pushdown
Strategy - Categorized pushdown strategy for predicates with index awareness.
Functions§
- predicate_
target_ column - If
expris a property predicate (Property(var, p) <op> _orProperty(var, p) IN _) onvariable, return the property name. Used by the planner to match analyzer-detected hash-index columns back to the originating predicate. - substitute_
params - Recursively replace
Expr::Parameter(name)with a literalExprresolved fromparams. ReturnsNoneif any parameter is missing or itsValuecannot be represented as a Cypher literal (so the predicate cannot be safely pushed to storage and the caller should fall back). - try_
label_ or_ to_ union - Detect a chain of single-label
LabelChecks combined withORover the same variable, collecting the labels into a flat list. - try_
type_ or_ to_ union - Detect a chain of
type(r) = 'A'equality checks combined withORover the same relationship variable, collecting the type names.