pub struct AstConverter {
pub planner: QueryPlanner,
}Expand description
Converts a parsed SelectStatement into a PhysicalPlan by delegating
to QueryPlanner::plan_search.
Fields§
§planner: QueryPlannerImplementations§
Source§impl AstConverter
impl AstConverter
pub fn new(planner: QueryPlanner) -> Self
Sourcepub fn convert(
&self,
stmt: SelectStatement,
vector_count: usize,
) -> Result<PhysicalPlan>
pub fn convert( &self, stmt: SelectStatement, vector_count: usize, ) -> Result<PhysicalPlan>
Convert a statement into a physical plan.
- Extracts the first
VECTOR_SIMcondition as the query vector. - Collects ALL AND-connected scalar conditions into structured filter JSON.
- Sets
output_columnsfrom the SELECT column list. - Falls back to
k = 10when no LIMIT clause is present.
Sourcepub fn extract_query_vector(stmt: &SelectStatement) -> Option<Vector>
pub fn extract_query_vector(stmt: &SelectStatement) -> Option<Vector>
Extract the query vector from a SelectStatement’s WHERE clause.
Auto Trait Implementations§
impl Freeze for AstConverter
impl RefUnwindSafe for AstConverter
impl Send for AstConverter
impl Sync for AstConverter
impl Unpin for AstConverter
impl UnsafeUnpin for AstConverter
impl UnwindSafe for AstConverter
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> 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> ⓘ
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