MCPcopy Create free account
hub / github.com/apache/calcite / forEachAgg

Method forEachAgg

core/src/main/java/org/apache/calcite/sql/SqlPivot.java:133–139  ·  view source on GitHub ↗

Returns the aggregate list as (alias, call) pairs. If there is no 'AS', alias is null.

(BiConsumer<@Nullable String, SqlNode> consumer)

Source from the content-addressed store, hash-verified

131 /** Returns the aggregate list as (alias, call) pairs.
132 * If there is no 'AS', alias is null. */
133 public void forEachAgg(BiConsumer<@Nullable String, SqlNode> consumer) {
134 for (SqlNode agg : aggList) {
135 final SqlNode call = SqlUtil.stripAs(agg);
136 final @Nullable String alias = SqlValidatorUtil.alias(agg);
137 consumer.accept(alias, call);
138 }
139 }
140
141 /** Returns the value list as (alias, node list) pairs. */
142 public void forEachNameValues(BiConsumer<String, SqlNodeList> consumer) {

Callers 2

convertPivotMethod · 0.80
validatePivotMethod · 0.80

Calls 3

stripAsMethod · 0.95
aliasMethod · 0.95
acceptMethod · 0.65

Tested by

no test coverage detected