Object

org.apache.spark.examples.sql.UserDefinedUntypedAggregation

MyAverage

Related Doc: package UserDefinedUntypedAggregation

Permalink

object MyAverage extends UserDefinedAggregateFunction

Linear Supertypes
UserDefinedAggregateFunction, Serializable, Serializable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. MyAverage
  2. UserDefinedAggregateFunction
  3. Serializable
  4. Serializable
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. def apply(exprs: Column*): Column

    Permalink

    Creates a Column for this UDAF using given Columns as input arguments.

    Creates a Column for this UDAF using given Columns as input arguments.

    Definition Classes
    UserDefinedAggregateFunction
    Annotations
    @varargs()
    Since

    1.5.0

  5. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  6. def bufferSchema: StructType

    Permalink

    A StructType represents data types of values in the aggregation buffer.

    A StructType represents data types of values in the aggregation buffer. For example, if a UserDefinedAggregateFunction's buffer has two values (i.e. two intermediate values) with type of DoubleType and LongType, the returned StructType will look like

    new StructType() .add("doubleInput", DoubleType) .add("longInput", LongType)

    The name of a field of this StructType is only used to identify the corresponding buffer value. Users can choose names to identify the input arguments.

    Definition Classes
    MyAverageUserDefinedAggregateFunction
    Since

    1.5.0

  7. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. def dataType: DataType

    Permalink

    The DataType of the returned value of this UserDefinedAggregateFunction.

    The DataType of the returned value of this UserDefinedAggregateFunction.

    Definition Classes
    MyAverageUserDefinedAggregateFunction
    Since

    1.5.0

  9. def deterministic: Boolean

    Permalink

    Returns true iff this function is deterministic, i.e.

    Returns true iff this function is deterministic, i.e. given the same input, always return the same output.

    Definition Classes
    MyAverageUserDefinedAggregateFunction
    Since

    1.5.0

  10. def distinct(exprs: Column*): Column

    Permalink

    Creates a Column for this UDAF using the distinct values of the given Columns as input arguments.

    Creates a Column for this UDAF using the distinct values of the given Columns as input arguments.

    Definition Classes
    UserDefinedAggregateFunction
    Annotations
    @varargs()
    Since

    1.5.0

  11. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  12. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  13. def evaluate(buffer: Row): Double

    Permalink

    Calculates the final result of this UserDefinedAggregateFunction based on the given aggregation buffer.

    Calculates the final result of this UserDefinedAggregateFunction based on the given aggregation buffer.

    Definition Classes
    MyAverageUserDefinedAggregateFunction
    Since

    1.5.0

  14. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  15. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  16. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  17. def initialize(buffer: MutableAggregationBuffer): Unit

    Permalink

    Initializes the given aggregation buffer, i.e.

    Initializes the given aggregation buffer, i.e. the zero value of the aggregation buffer.

    The contract should be that applying the merge function on two initial buffers should just return the initial buffer itself, i.e. merge(initialBuffer, initialBuffer) should equal initialBuffer.

    Definition Classes
    MyAverageUserDefinedAggregateFunction
    Since

    1.5.0

  18. def inputSchema: StructType

    Permalink

    A StructType represents data types of input arguments of this aggregate function.

    A StructType represents data types of input arguments of this aggregate function. For example, if a UserDefinedAggregateFunction expects two input arguments with type of DoubleType and LongType, the returned StructType will look like

    new StructType() .add("doubleInput", DoubleType) .add("longInput", LongType)

    The name of a field of this StructType is only used to identify the corresponding input argument. Users can choose names to identify the input arguments.

    Definition Classes
    MyAverageUserDefinedAggregateFunction
    Since

    1.5.0

  19. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  20. def merge(buffer1: MutableAggregationBuffer, buffer2: Row): Unit

    Permalink

    Merges two aggregation buffers and stores the updated buffer values back to buffer1.

    Merges two aggregation buffers and stores the updated buffer values back to buffer1.

    This is called when we merge two partially aggregated data together.

    Definition Classes
    MyAverageUserDefinedAggregateFunction
    Since

    1.5.0

  21. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  22. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  23. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  24. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  25. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  26. def update(buffer: MutableAggregationBuffer, input: Row): Unit

    Permalink

    Updates the given aggregation buffer buffer with new input data from input.

    Updates the given aggregation buffer buffer with new input data from input.

    This is called once per input row.

    Definition Classes
    MyAverageUserDefinedAggregateFunction
    Since

    1.5.0

  27. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  28. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  29. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Serializable

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped