pub struct GetRowCountPass<'a> { /* private fields */ }Expand description
Pass that optimizes COUNT(*) queries.
Implementations§
Source§impl<'a> GetRowCountPass<'a>
impl<'a> GetRowCountPass<'a>
Sourcepub fn new(ctx: &'a ExecutionContext) -> Self
pub fn new(ctx: &'a ExecutionContext) -> Self
Creates a new GetRowCountPass with the given execution context.
Sourcepub fn optimize(
&self,
plan: PhysicalPlan,
) -> (PhysicalPlan, Option<GetRowCountPlan>)
pub fn optimize( &self, plan: PhysicalPlan, ) -> (PhysicalPlan, Option<GetRowCountPlan>)
Optimizes the physical plan by replacing COUNT(*) with direct row count. Returns the optimized plan and optionally a GetRowCountPlan if applicable.
Sourcepub fn get_row_count(&self, table: &str) -> usize
pub fn get_row_count(&self, table: &str) -> usize
Gets the row count for a table from the execution context.
Auto Trait Implementations§
impl<'a> Freeze for GetRowCountPass<'a>
impl<'a> RefUnwindSafe for GetRowCountPass<'a>
impl<'a> Send for GetRowCountPass<'a>
impl<'a> Sync for GetRowCountPass<'a>
impl<'a> Unpin for GetRowCountPass<'a>
impl<'a> UnwindSafe for GetRowCountPass<'a>
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