pub enum GroupByItem {
Expr {
expr: Expr,
},
Rollup {
exprs: Vec<Expr>,
},
Cube {
exprs: Vec<Expr>,
},
GroupingSets {
sets: Vec<Vec<Expr>>,
},
}Expand description
One item of a GROUP BY list (issue #149, contract 0.13.0).
GROUP BY a, ROLLUP(b, c) is [Expr(a), Rollup([b, c])]; the planner
expands the items into grouping sets by cross product (D2). GROUP BY ()
arrives as one GroupingSets item holding a single empty set.
Variants§
Implementations§
Source§impl GroupByItem
impl GroupByItem
Sourcepub fn exprs(&self) -> Box<dyn Iterator<Item = &Expr> + '_>
pub fn exprs(&self) -> Box<dyn Iterator<Item = &Expr> + '_>
Iterate every expression contained in this item, in source order.
Sourcepub fn exprs_mut(&mut self) -> Box<dyn Iterator<Item = &mut Expr> + '_>
pub fn exprs_mut(&mut self) -> Box<dyn Iterator<Item = &mut Expr> + '_>
Mutably iterate every expression contained in this item.
Span normalization, natural-join annotation, and named-window resolution all walk this iterator so that expressions inside ROLLUP/CUBE/GROUPING SETS receive the same treatment as plain keys.
Trait Implementations§
Source§impl Clone for GroupByItem
impl Clone for GroupByItem
Source§fn clone(&self) -> GroupByItem
fn clone(&self) -> GroupByItem
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for GroupByItem
impl Debug for GroupByItem
Source§impl<'de> Deserialize<'de> for GroupByItem
impl<'de> Deserialize<'de> for GroupByItem
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for GroupByItem
impl RefUnwindSafe for GroupByItem
impl Send for GroupByItem
impl Sync for GroupByItem
impl Unpin for GroupByItem
impl UnsafeUnpin for GroupByItem
impl UnwindSafe for GroupByItem
Blanket Implementations§
impl<T> Allocation for T
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