coral-beam/src/main/java/com/linkedin/beam/utils/RexToBeamConverter.java
private ParameterExpression declareLocalVar(RexNode node, Expression assignedExpression) {
    if (assignedExpression instanceof ParameterExpression) {
      // If the assigned expression is already a variable, no need to declare a new variable
      return (ParameterExpression) assignedExpression;
    }

    final ParameterExpression localVar = Expressions.parameter(assignedExpression.getType(), "var" + varCount++);
    localVarDeclarations.add(Expressions.declare(Modifier.FINAL, localVar, assignedExpression));
    if (node != null) {
      localVarMap.put(node, localVar);
    }
    return localVar;
  }
/**
   * Declares a local variables for an expression.
   *
   * @param node Original relational expression
   * @param assignedExpression Beam code expression
   * @return Local variable expression representing the expression
   */
Declares a local variables for an expression.
@param node Original relational expression
@param assignedExpression Beam code expression
@return Local variable expression representing the expression
Declares a local variables for an expression . @param node Original relational expression @param assignedExpression Beam code expression @return Local variable expression representing the expression
private ParameterExpression declareLocalVar(RexNode node, Expression assignedExpression) {
    if (assignedExpression instanceof ParameterExpression) {
      return (ParameterExpression) assignedExpression;
    }
    final ParameterExpression localVar = Expressions.parameter(assignedExpression.getType(), "var" + varCount++);
    localVarDeclarations.add(Expressions.declare(Modifier.FINAL, localVar, assignedExpression));
    if (node != null) {
      localVarMap.put(node, localVar);
    }
    return localVar;
  }
private ParameterExpression declareLocalVar ( RexNode node , Expression assignedExpression ) { if ( assignedExpression instanceof ParameterExpression ) { return ( ParameterExpression ) assignedExpression ; } final ParameterExpression localVar = Expressions . parameter ( assignedExpression . getType ( ) , "var" + varCount ++ ) ; localVarDeclarations . add ( Expressions . declare ( Modifier . FINAL , localVar , assignedExpression ) ) ; if ( node != null ) { localVarMap . put ( node , localVar ) ; } return localVar ; }
Declares a local variables for an expression.
Declares a local variables for an expression .
// If the assigned expression is already a variable, no need to declare a new variable