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.
- Alphabetic
- By Inheritance
- HashMapGenerator
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new HashMapGenerator(ctx: CodegenContext, aggregateExpressions: Seq[AggregateExpression], generatedClassName: String, groupingKeySchema: StructType, bufferSchema: StructType)
Type Members
Abstract Value Members
-
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
-
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
-
abstract
def
generateRowIterator(): String
- Attributes
- protected
-
abstract
def
initializeAggregateHashMap(): String
- Attributes
- protected
Concrete Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
- val buffVars: Seq[ExprCode]
- val bufferValues: Seq[Buffer]
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
genComputeHash(ctx: CodegenContext, input: String, dataType: DataType, result: String): String
- Attributes
- protected
- def generate(): String
-
final
def
generateClose(): String
- Attributes
- protected
-
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
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- val groupingKeySignature: String
- val groupingKeys: Seq[Buffer]
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()