coral-beam/src/main/java/com/linkedin/beam/operators/BeamAggregate.java
private void collectAggregateInput(ParameterExpression inputRecord, AggregateCall aggCall,
      Map<Integer, List<Expression>> inputColMap) {
    final RelDataType inputRowtype = getInput().getRowType();
    for (int col : aggCall.getArgList()) {
      if (!inputColMap.containsKey(col)) {
        // Declare input col var. Code example:
        // Long project2longCol = (Long) inputRecord.get("longCol");
        final Expression colExpr = RexBeamUtils.getFieldExpression(inputRowtype, col, inputRecord);
        final Expression colVar = getColumnVar(getInput(), col, false);
        inputColMap.put(col, Lists.newArrayList(colVar, colExpr));
      }
    }
  }
// Collects statements for getting input cols of an aggregate call
Collects statements for getting input cols of an aggregate call
Collects statements for getting input cols of an aggregate call
private void collectAggregateInput(ParameterExpression inputRecord, AggregateCall aggCall,
      Map<Integer, List<Expression>> inputColMap) {
    final RelDataType inputRowtype = getInput().getRowType();
    for (int col : aggCall.getArgList()) {
      if (!inputColMap.containsKey(col)) {
        final Expression colExpr = RexBeamUtils.getFieldExpression(inputRowtype, col, inputRecord);
        final Expression colVar = getColumnVar(getInput(), col, false);
        inputColMap.put(col, Lists.newArrayList(colVar, colExpr));
      }
    }
  }
private void collectAggregateInput ( ParameterExpression inputRecord , AggregateCall aggCall , Map < Integer , List < Expression > > inputColMap ) { final RelDataType inputRowtype = getInput ( ) . getRowType ( ) ; for ( int col : aggCall . getArgList ( ) ) { if ( ! inputColMap . containsKey ( col ) ) { final Expression colExpr = RexBeamUtils . getFieldExpression ( inputRowtype , col , inputRecord ) ; final Expression colVar = getColumnVar ( getInput ( ) , col , false ) ; inputColMap . put ( col , Lists . newArrayList ( colVar , colExpr ) ) ; } } }
Collects statements for getting input cols of an aggregate call
Collects statements for getting input cols of an aggregate call
// Declare input col var. Code example: // Long project2longCol = (Long) inputRecord.get("longCol");