pub struct CardinalityFeedback { /* private fields */ }Expand description
Feedback from runtime execution about actual cardinalities.
This struct collects actual row counts at various points during query execution, allowing comparison with optimizer estimates.
Implementations§
Source§impl CardinalityFeedback
impl CardinalityFeedback
Sourcepub fn record(&mut self, operator_id: &str, count: u64)
pub fn record(&mut self, operator_id: &str, count: u64)
Records the final actual cardinality for an operator.
Sourcepub fn add_rows(&self, operator_id: &str, count: u64)
pub fn add_rows(&self, operator_id: &str, count: u64)
Adds to the running count for an operator (thread-safe).
Sourcepub fn init_counter(&mut self, operator_id: &str)
pub fn init_counter(&mut self, operator_id: &str)
Initializes a running counter for an operator.
Sourcepub fn finalize_counter(&mut self, operator_id: &str)
pub fn finalize_counter(&mut self, operator_id: &str)
Finalizes the running count into the actuals.
Sourcepub fn get_running(&self, operator_id: &str) -> Option<u64>
pub fn get_running(&self, operator_id: &str) -> Option<u64>
Gets the current running count for an operator.
Sourcepub fn all_actuals(&self) -> &HashMap<String, u64>
pub fn all_actuals(&self) -> &HashMap<String, u64>
Returns all recorded actuals.
Trait Implementations§
Source§impl Debug for CardinalityFeedback
impl Debug for CardinalityFeedback
Source§impl Default for CardinalityFeedback
impl Default for CardinalityFeedback
Source§fn default() -> CardinalityFeedback
fn default() -> CardinalityFeedback
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for CardinalityFeedback
impl RefUnwindSafe for CardinalityFeedback
impl Send for CardinalityFeedback
impl Sync for CardinalityFeedback
impl Unpin for CardinalityFeedback
impl UnwindSafe for CardinalityFeedback
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