public class AggregateCall extends Object
LogicalAggregate.| Modifier and Type | Field and Description |
|---|---|
String |
name |
RelDataType |
type |
| Constructor and Description |
|---|
AggregateCall(SqlAggFunction aggFunction,
boolean distinct,
List<Integer> argList,
RelDataType type,
String name)
Creates an AggregateCall.
|
| Modifier and Type | Method and Description |
|---|---|
AggregateCall |
adaptTo(RelNode input,
List<Integer> aggArgs,
int oldGroupKeyCount,
int newGroupKeyCount)
Creates equivalent AggregateCall that is adapted to a new input types
and/or number of columns in GROUP BY.
|
AggregateCall |
copy(List<Integer> args)
Creates an equivalent AggregateCall with new argument ordinals.
|
static AggregateCall |
create(SqlAggFunction aggFunction,
boolean distinct,
List<Integer> argList,
int groupCount,
RelNode input,
RelDataType type,
String name)
Creates an AggregateCall, inferring its type if
type is null. |
Aggregate.AggCallBinding |
createBinding(Aggregate aggregateRelBase)
Creates a binding of this call in the context of an
LogicalAggregate,
which can then be used to infer the return type. |
boolean |
equals(Object o) |
SqlAggFunction |
getAggregation()
Returns the aggregate function.
|
List<Integer> |
getArgList()
Returns the ordinals of the arguments to this call.
|
String |
getName()
Returns the name.
|
RelDataType |
getType()
Returns the result type.
|
int |
hashCode() |
boolean |
isDistinct()
Returns whether this AggregateCall is distinct, as in
COUNT(DISTINCT empno). |
AggregateCall |
rename(String name)
Creates an equivalent AggregateCall that has a new name.
|
String |
toString() |
AggregateCall |
transform(Mappings.TargetMapping mapping)
Creates a copy of this aggregate call, applying a mapping to its
arguments.
|
public final RelDataType type
public final String name
public AggregateCall(SqlAggFunction aggFunction, boolean distinct, List<Integer> argList, RelDataType type, String name)
aggFunction - Aggregate functiondistinct - Whether distinctargList - List of ordinals of argumentstype - Result typename - Name (may be null)public static AggregateCall create(SqlAggFunction aggFunction, boolean distinct, List<Integer> argList, int groupCount, RelNode input, RelDataType type, String name)
type is null.public final boolean isDistinct()
COUNT(DISTINCT empno).public final SqlAggFunction getAggregation()
public final List<Integer> getArgList()
The list is immutable.
public final RelDataType getType()
public String getName()
public AggregateCall rename(String name)
name - New name (may be null)public Aggregate.AggCallBinding createBinding(Aggregate aggregateRelBase)
LogicalAggregate,
which can then be used to infer the return type.public AggregateCall copy(List<Integer> args)
args - Argumentspublic AggregateCall adaptTo(RelNode input, List<Integer> aggArgs, int oldGroupKeyCount, int newGroupKeyCount)
input - relation that will be used as a child of aggregateaggArgs - argument indices of the new call in the inputoldGroupKeyCount - number of columns in GROUP BY of old aggregatenewGroupKeyCount - number of columns in GROUP BY of new aggregatepublic AggregateCall transform(Mappings.TargetMapping mapping)
Copyright © 2012–2015 The Apache Software Foundation. All rights reserved.