Package org.apache.calcite.util
Class Smalls.MySum3
- java.lang.Object
-
- org.apache.calcite.util.Smalls.MySum3
-
- All Implemented Interfaces:
Smalls.MyGenericAggFunction<java.lang.Integer,java.lang.Integer,java.lang.Integer>
- Enclosing class:
- Smalls
public static class Smalls.MySum3 extends java.lang.Object implements Smalls.MyGenericAggFunction<java.lang.Integer,java.lang.Integer,java.lang.Integer>
Example of a user-defined aggregate function that implements a generic interface.
-
-
Constructor Summary
Constructors Constructor Description MySum3()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Integer
add(java.lang.Integer accumulator, java.lang.Integer val)
java.lang.Integer
init()
java.lang.Integer
merge(java.lang.Integer accumulator1, java.lang.Integer accumulator2)
java.lang.Integer
result(java.lang.Integer accumulator)
-
-
-
Method Detail
-
init
public java.lang.Integer init()
- Specified by:
init
in interfaceSmalls.MyGenericAggFunction<java.lang.Integer,java.lang.Integer,java.lang.Integer>
-
add
public java.lang.Integer add(java.lang.Integer accumulator, java.lang.Integer val)
- Specified by:
add
in interfaceSmalls.MyGenericAggFunction<java.lang.Integer,java.lang.Integer,java.lang.Integer>
-
merge
public java.lang.Integer merge(java.lang.Integer accumulator1, java.lang.Integer accumulator2)
- Specified by:
merge
in interfaceSmalls.MyGenericAggFunction<java.lang.Integer,java.lang.Integer,java.lang.Integer>
-
result
public java.lang.Integer result(java.lang.Integer accumulator)
- Specified by:
result
in interfaceSmalls.MyGenericAggFunction<java.lang.Integer,java.lang.Integer,java.lang.Integer>
-
-