Class TestFunctions.MedianString

  • All Implemented Interfaces:
    AggregateFunction
    Enclosing class:
    TestFunctions

    public static class TestFunctions.MedianString
    extends java.lang.Object
    implements AggregateFunction
    This median implementation keeps all objects in memory.
    • Constructor Summary

      Constructors 
      Constructor Description
      MedianString()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void add​(java.lang.Object value)
      This method is called once for each row.
      java.lang.Object getResult()
      This method returns the computed aggregate value.
      int getType​(int[] inputType)
      This method must return the SQL type of the method, given the SQL type of the input data.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • MedianString

        public MedianString()
    • Method Detail

      • add

        public void add​(java.lang.Object value)
        Description copied from interface: AggregateFunction
        This method is called once for each row. If the aggregate function is called with multiple parameters, those are passed as array.
        Specified by:
        add in interface AggregateFunction
        Parameters:
        value - the value(s) for this row
      • getResult

        public java.lang.Object getResult()
        Description copied from interface: AggregateFunction
        This method returns the computed aggregate value. This method must preserve previously added values and must be able to reevaluate result if more values were added since its previous invocation.
        Specified by:
        getResult in interface AggregateFunction
        Returns:
        the aggregated value
      • getType

        public int getType​(int[] inputType)
        Description copied from interface: AggregateFunction
        This method must return the SQL type of the method, given the SQL type of the input data. The method should check here if the number of parameters passed is correct, and if not it should throw an exception.
        Specified by:
        getType in interface AggregateFunction
        Parameters:
        inputType - the SQL type of the parameters, Types
        Returns:
        the SQL type of the result