pub struct FloatSum {
pub text: String,
pub mean: bool,
pub table: String,
pub column: String,
pub column_sql: String,
pub order: Vec<(String, String)>,
}Expand description
A pushdown plan: SQL whose execution is provably identical to
the Quarb query’s — plus the table whose primary key must order
the rows (None for a single aggregate row, where order is
moot). The driver appends the ORDER BY, since the key lives in
its catalog.
A sum or a mean over a column, as a plan’s statement writes it
(text: SUM(unit_price)). The engine adds a float column by
the careful sum, in key order; SQLite adds the same way, and its
SUM is the engine’s to the last digit. PostgreSQL and DuckDB add
plainly and across workers, in no fixed order, so a float sum
there moves in its last digits from one run to the next: their
doors ask the catalog whether the column is a float and rewrite
the sum in the dialect’s ordered form (sum(x ORDER BY key)),
which is the same number every run. The plan says which sums it
holds; the door does the rest.
table is the table the column is looked up in. order is what
the scan adds by: the tables whose keys order the rows, each with
the name the statement gives it (the driver; after it the joined
table where every witness is bound, under its alias where it is
joined to itself).
Fields§
§text: String§mean: bool§table: String§column: String§column_sql: String§order: Vec<(String, String)>Trait Implementations§
impl Eq for FloatSum
impl StructuralPartialEq for FloatSum
Auto Trait Implementations§
impl Forget for FloatSum
impl Freeze for FloatSum
impl Move for FloatSum
impl RefUnwindSafe for FloatSum
impl Send for FloatSum
impl Sync for FloatSum
impl Unpin for FloatSum
impl UnsafeUnpin for FloatSum
impl UnwindSafe for FloatSum
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.