public final class GroupingElement extends Object
GROUP BY element (slice
128). Where StatementGraph.getGroupByColumnRefs() flattens every
grouping column into one ordered list (slice 127), this preserves the
grouping structure the flat list discards: whether each top-level
grouping element is plain, ROLLUP(...), CUBE(...), or
GROUPING SETS(...), together with that element's member columns.
One GroupingElement is emitted per top-level grouping item in
document order. StatementGraph.getGroupingElements() is therefore
empty iff the statement has no GROUP BY items, and a plain
GROUP BY a, b yields [SIMPLE: a, b] (one element per
top-level item).
Boundary (slice 128). members is the flattened, ordered
set of leaf column refs of the element. For GroupingElement.Kind.GROUPING_SETS the
internal set boundaries are flattened — GROUPING SETS((a),(c)) and
GROUPING SETS((a,c)) both surface as [GROUPING_SETS: a, c].
Distinguishing the individual grouping sets is left to a future slice.
Member collection reuses the slice-127 + slice-93 source-table fallback
path, so members carry the same EXACT-binding guarantees as
groupByColumnRefs.
| Modifier and Type | Class and Description |
|---|---|
static class |
GroupingElement.Kind
The grouping operation of a top-level
GROUP BY element. |
| Constructor and Description |
|---|
GroupingElement(GroupingElement.Kind kind,
List<ColumnRef> members) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
GroupingElement.Kind |
getKind() |
List<ColumnRef> |
getMembers()
Flattened, ordered leaf column refs of this element (may be empty).
|
int |
hashCode() |
String |
toString() |
public GroupingElement(GroupingElement.Kind kind, List<ColumnRef> members)
public GroupingElement.Kind getKind()
public List<ColumnRef> getMembers()