/** * Creates an equivalent AggregateCall that has a new name. * * @param name New name (may be null) */ public AggregateCall rename(String name) { // no need to copy argList - already immutable return new AggregateCall(aggregation, distinct, argList, type, name); }
new AggregateCall( aggregation, distinct,
/** * Creates an equivalent AggregateCall that has a new name. * * @param name New name (may be null) */ public AggregateCall rename(String name) { // no need to copy argList - already immutable return new AggregateCall(aggregation, distinct, argList, type, name); }
new AggregateRel(cluster, seek, BitSets.of(), ImmutableList.of( new AggregateCall(SqlStdOperatorTable.COUNT, false, ImmutableList.<Integer>of(), longType, null), new AggregateCall(SqlStdOperatorTable.COUNT, false, args, longType, null))); JoinRel join =
private static List<AggregateCall> apply(final Mapping mapping, List<AggregateCall> aggCallList) { return Lists.transform(aggCallList, new Function<AggregateCall, AggregateCall>() { public AggregateCall apply(AggregateCall call) { return new AggregateCall(call.getAggregation(), call.isDistinct(), Mappings.apply2(mapping, call.getArgList()), call.getType(), call.name); } }); }
private AggregateCall toAggCall(Map<String, Object> jsonAggCall) { final String aggName = (String) jsonAggCall.get("agg"); final Aggregation aggregation = relJson.toAggregation(aggName, jsonAggCall); final Boolean distinct = (Boolean) jsonAggCall.get("distinct"); final List<Integer> operands = (List<Integer>) jsonAggCall.get("operands"); final RelDataType type = relJson.toType(cluster.getTypeFactory(), jsonAggCall.get("type")); return new AggregateCall(aggregation, distinct, operands, type, null); }
public AggregateCall get(int index) { final RexWinAggCall aggCall = aggCalls.get(index); return new AggregateCall( (Aggregation) aggCall.getOperator(), false, getProjectOrdinals(aggCall.getOperands()), aggCall.getType(), fieldNames.get(aggCall.ordinal)); } };
public AggregateCall get(int index) { final RexWinAggCall aggCall = aggCalls.get(index); return new AggregateCall( (Aggregation) aggCall.getOperator(), false, getProjectOrdinals(aggCall.getOperands()), aggCall.getType(), fieldNames.get(aggCall.ordinal)); } };
new AggregateCall( aggCall.getAggregation(), false,
private void gatherAggregateCalls( List<AggregateCall> distincts, List<AggregateCall> concurrents ) { for( int i = 0; i < aggCalls.size(); i++ ) { AggregateCall aggCall = aggCalls.get( i ); if( aggCall.getName() == null ) { String name = getRowType().getFieldList().get( groupSet.cardinality() + i ).getName(); // TODO: use AggregateCall.rename(name) when available aggCall = new AggregateCall( aggCall.getAggregation(), aggCall.isDistinct(), aggCall.getArgList(), aggCall.getType(), name ); } if( aggCall.isDistinct() ) distincts.add( aggCall ); else concurrents.add( aggCall ); } }
new AggregateCall( aggCall.getAggregation(), false,
public AggregateCall apply(AggregateCall call) { return new AggregateCall(call.getAggregation(), call.isDistinct(), Mappings.apply2(mapping, call.getArgList()), call.getType(), call.name); } });
new AggregateCall( SqlStdOperatorTable.SINGLE_VALUE, false,
final List<Integer> nullableArgs = nullableArgs(args, aggArgTypes); if (!nullableArgs.equals(args)) { aggCall = new AggregateCall(aggCall.getAggregation(), aggCall.isDistinct(), nullableArgs, aggCall.getType(), aggCall.getName());
new AggregateCall( SqlStdOperatorTable.singleValueOperator, false,
new AggregateCall( aggFun, origCall.isDistinct(),
new AggregateCall( aggFun, origCall.isDistinct(),
new AggregateCall(getRollup(aggregateCall.getAggregation()), aggregateCall.isDistinct(), ImmutableList.of(groupSet.cardinality() + i),
return new AggregateCall( aggregation, isDistinct(),
SqlAggFunction sumAgg = new SqlSumAggFunction(sumType); AggregateCall sumCall = new AggregateCall( sumAgg, oldCall.isDistinct(), RelDataType countType = countAgg.getReturnType(typeFactory); AggregateCall countCall = new AggregateCall( countAgg, oldCall.isDistinct(),