AVG
Double
expression ::= AVG([DISTINCT] state_field_path_expression)
@see AvgFunction @version 2.4 @since 2.4 @author Pascal Filion
122123124125126127128129
StateObject stateObject = new ArithmeticFactorStateObject(parent, plusSign, pop()); add(stateObject); } protected void avg(boolean distinct, String path) { StateObject stateObject = new AvgFunctionStateObject(parent, distinct, literal(path)); add(stateObject); }
628629630631632633634635636637638639640641
@Override public void visit(AvgFunction expression) { expression.getExpression().accept(this); AvgFunctionStateObject stateObject = new AvgFunctionStateObject( parent, expression.hasDistinct(), this.stateObject ); stateObject.setExpression(expression); this.stateObject = stateObject; }