org.apache.hadoop.hive.ql.exec.vector
Class VectorHashKeyWrapper

java.lang.Object
  extended by org.apache.hadoop.hive.ql.exec.KeyWrapper
      extended by org.apache.hadoop.hive.ql.exec.vector.VectorHashKeyWrapper

public class VectorHashKeyWrapper
extends KeyWrapper

A hash map key wrapper for vectorized processing. It stores the key values as primitives in arrays for each supported primitive type. This works in conjunction with VectorHashKeyWrapperBatch to hash vectorized processing units (batches).


Constructor Summary
VectorHashKeyWrapper(int longValuesCount, int doubleValuesCount, int byteValuesCount, int decimalValuesCount)
           
 
Method Summary
 void assignDecimal(int index, Decimal128 value)
           
 void assignDouble(int index, double d)
           
 void assignLong(int index, long v)
           
 void assignNullDecimal(int index)
           
 void assignNullDouble(int index)
           
 void assignNullLong(int index)
           
 void assignNullString(int index)
           
 void assignString(int index, byte[] bytes, int start, int length)
           
 KeyWrapper copyKey()
           
 void copyKey(KeyWrapper oldWrapper)
           
 void duplicateTo(VectorHashKeyWrapper clone)
           
 boolean equals(Object that)
           
 int getByteLength(int i)
           
 byte[] getBytes(int i)
           
 int getByteStart(int i)
           
 Decimal128 getDecimal(int i)
           
 double getDoubleValue(int i)
           
 boolean getIsBytesNull(int i)
           
 boolean getIsDecimalNull(int i)
           
 boolean getIsDoubleNull(int i)
           
 boolean getIsLongNull(int i)
           
 Object[] getKeyArray()
           
 long getLongValue(int i)
           
 void getNewKey(Object row, ObjectInspector rowInspector)
           
 int getVariableSize()
           
 int hashCode()
           
 void setHashKey()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

VectorHashKeyWrapper

public VectorHashKeyWrapper(int longValuesCount,
                            int doubleValuesCount,
                            int byteValuesCount,
                            int decimalValuesCount)
Method Detail

getNewKey

public void getNewKey(Object row,
                      ObjectInspector rowInspector)
               throws HiveException
Specified by:
getNewKey in class KeyWrapper
Throws:
HiveException

setHashKey

public void setHashKey()
Specified by:
setHashKey in class KeyWrapper

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object that)
Overrides:
equals in class Object

duplicateTo

public void duplicateTo(VectorHashKeyWrapper clone)

copyKey

public KeyWrapper copyKey()
Specified by:
copyKey in class KeyWrapper

copyKey

public void copyKey(KeyWrapper oldWrapper)
Specified by:
copyKey in class KeyWrapper

getKeyArray

public Object[] getKeyArray()
Specified by:
getKeyArray in class KeyWrapper

assignDouble

public void assignDouble(int index,
                         double d)

assignNullDouble

public void assignNullDouble(int index)

assignLong

public void assignLong(int index,
                       long v)

assignNullLong

public void assignNullLong(int index)

assignString

public void assignString(int index,
                         byte[] bytes,
                         int start,
                         int length)

assignNullString

public void assignNullString(int index)

assignDecimal

public void assignDecimal(int index,
                          Decimal128 value)

assignNullDecimal

public void assignNullDecimal(int index)

toString

public String toString()
Overrides:
toString in class Object

getIsLongNull

public boolean getIsLongNull(int i)

getIsDoubleNull

public boolean getIsDoubleNull(int i)

getIsBytesNull

public boolean getIsBytesNull(int i)

getLongValue

public long getLongValue(int i)

getDoubleValue

public double getDoubleValue(int i)

getBytes

public byte[] getBytes(int i)

getByteStart

public int getByteStart(int i)

getByteLength

public int getByteLength(int i)

getVariableSize

public int getVariableSize()

getIsDecimalNull

public boolean getIsDecimalNull(int i)

getDecimal

public Decimal128 getDecimal(int i)


Copyright © 2014 The Apache Software Foundation. All rights reserved.