Skip to main content

Module pushdown

Module pushdown 

Source
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§

IndexAwareAnalyzer
Analyzer that considers available indexes when categorizing predicates.
LanceFilterGenerator
Converts pushable predicates to Lance SQL filter strings.
PredicateAnalysis
Split result of predicate analysis: pushable vs residual.
PredicateAnalyzer
Classifies predicates as pushable to Lance or residual (post-scan).
PushdownStrategy
Categorized pushdown strategy for predicates with index awareness.

Functions§

predicate_target_column
If expr is a property predicate (Property(var, p) <op> _ or Property(var, p) IN _) on variable, 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 literal Expr resolved from params. Returns None if any parameter is missing or its Value cannot 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 with OR over 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 with OR over the same relationship variable, collecting the type names.