[−][src]Struct postgres_parser::nodes::GroupingFunc
GroupingFunc
A GroupingFunc is a GROUPING(...) expression, which behaves in many ways like an aggregate function (e.g. it "belongs" to a specific query level, which might not be the one immediately containing it), but also differs in an important respect: it never evaluates its arguments, they merely designate expressions from the GROUP BY clause of the query level to which it belongs.
The spec defines the evaluation of GROUPING() purely by syntactic replacement, but we make it a real expression for optimization purposes so that one Agg node can handle multiple grouping sets at once. Evaluating the result only needs the column positions to check against the grouping set being projected. However, for EXPLAIN to produce meaningful output, we have to keep the original expressions around, since expression deparse does not give us any feasible way to get at the GROUP BY clause.
Also, we treat two GroupingFunc nodes as equal if they have equal arguments lists and agglevelsup, without comparing the refs and cols annotations.
In raw parse output we have only the args list; parse analysis fills in the refs list, and the planner fills in the cols list.
Fields
args: Option<Vec<Node>>
refs: Option<Vec<Node>>
cols: Option<Vec<Node>>
agglevelsup: Index
location: i32
Trait Implementations
impl Debug for GroupingFunc
[src]
impl<'de> Deserialize<'de> for GroupingFunc
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Eq for GroupingFunc
[src]
impl PartialEq<GroupingFunc> for GroupingFunc
[src]
fn eq(&self, other: &GroupingFunc) -> bool
[src]
fn ne(&self, other: &GroupingFunc) -> bool
[src]
impl Serialize for GroupingFunc
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl StructuralEq for GroupingFunc
[src]
impl StructuralPartialEq for GroupingFunc
[src]
Auto Trait Implementations
impl RefUnwindSafe for GroupingFunc
impl Send for GroupingFunc
impl Sync for GroupingFunc
impl Unpin for GroupingFunc
impl UnwindSafe for GroupingFunc
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,