org.apache.spark.sql.execution.aggregate

HashMapGenerator

abstract class HashMapGenerator extends AnyRef

This is a helper class to generate an append-only row-based hash map that can act as a 'cache' for extremely fast key-value lookups while evaluating aggregates (and fall back to the BytesToBytesMap if a given key isn't found). This is 'codegened' in HashAggregate to speed up aggregates w/ key.

NOTE: the generated hash map currently doesn't support nullable keys and falls back to the BytesToBytesMap to store them.

Linear Supertypes
AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. HashMapGenerator
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new HashMapGenerator(ctx: CodegenContext, aggregateExpressions: Seq[AggregateExpression], generatedClassName: String, groupingKeySchema: StructType, bufferSchema: StructType)

Type Members

  1. case class Buffer(dataType: DataType, name: String) extends Product with Serializable

Abstract Value Members

  1. abstract def generateEquals(): String

    Generates a method that returns true if the group-by keys exist at a given index.

    Generates a method that returns true if the group-by keys exist at a given index.

    Attributes
    protected
  2. abstract def generateFindOrInsert(): String

    Generates a method that returns a row which keeps track of the aggregate value(s) for a given set of keys.

    Generates a method that returns a row which keeps track of the aggregate value(s) for a given set of keys. If the corresponding row doesn't exist, the generated method adds the corresponding row in the associated key value batch.

    Attributes
    protected
  3. abstract def generateRowIterator(): String

    Attributes
    protected
  4. abstract def initializeAggregateHashMap(): String

    Attributes
    protected

Concrete Value Members

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

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

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

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. val buffVars: Seq[ExprCode]

  8. val bufferValues: Seq[Buffer]

  9. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  10. final def eq(arg0: AnyRef): Boolean

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

    Definition Classes
    AnyRef → Any
  12. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  13. final def genComputeHash(ctx: CodegenContext, input: String, dataType: DataType, result: String): String

    Attributes
    protected
  14. def generate(): String

  15. final def generateClose(): String

    Attributes
    protected
  16. final def generateHashFunction(): String

    Generates a method that computes a hash by currently xor-ing all individual group-by keys.

    Generates a method that computes a hash by currently xor-ing all individual group-by keys. For instance, if we have 2 long group-by keys, the generated function would be of the form:

    private long hash(long agg_key, long agg_key1) {
    return agg_key ^ agg_key1;
    }
    Attributes
    protected
  17. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  18. val groupingKeySignature: String

  19. val groupingKeys: Seq[Buffer]

  20. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  21. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  22. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  23. final def notify(): Unit

    Definition Classes
    AnyRef
  24. final def notifyAll(): Unit

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

    Definition Classes
    AnyRef
  26. def toString(): String

    Definition Classes
    AnyRef → Any
  27. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped