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

java.lang.Object
  extended by org.apache.hadoop.hive.ql.exec.vector.ColumnVector
      extended by org.apache.hadoop.hive.ql.exec.vector.DecimalColumnVector

public class DecimalColumnVector
extends ColumnVector


Field Summary
 short precision
           
 short scale
           
 Decimal128[] vector
          A vector if Decimal128 objects.
 
Fields inherited from class org.apache.hadoop.hive.ql.exec.vector.ColumnVector
isNull, isRepeating, noNulls
 
Constructor Summary
DecimalColumnVector(int precision, int scale)
           
DecimalColumnVector(int size, int precision, int scale)
           
 
Method Summary
 void checkPrecisionOverflow(int i)
          Check if the value at position i fits in the available precision, and convert the value to NULL if it does not.
 void flatten(boolean selectedInUse, int[] sel, int size)
           
 org.apache.hadoop.io.Writable getWritableObject(int index)
           
 void setElement(int outElementNum, int inputElementNum, ColumnVector inputVector)
          Set the element in this column vector from the given input vector.
 
Methods inherited from class org.apache.hadoop.hive.ql.exec.vector.ColumnVector
flattenNoNulls, flattenRepeatingNulls, init, reset, unFlatten
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

vector

public Decimal128[] vector
A vector if Decimal128 objects. These are mutable and have fairly efficient operations on them. This will make it faster to load column vectors and perform decimal vector operations with decimal- specific VectorExpressions. For high performance and easy access to this low-level structure, the fields are public by design (as they are in other ColumnVector types).


scale

public short scale

precision

public short precision
Constructor Detail

DecimalColumnVector

public DecimalColumnVector(int precision,
                           int scale)

DecimalColumnVector

public DecimalColumnVector(int size,
                           int precision,
                           int scale)
Method Detail

getWritableObject

public org.apache.hadoop.io.Writable getWritableObject(int index)
Specified by:
getWritableObject in class ColumnVector

flatten

public void flatten(boolean selectedInUse,
                    int[] sel,
                    int size)
Specified by:
flatten in class ColumnVector

setElement

public void setElement(int outElementNum,
                       int inputElementNum,
                       ColumnVector inputVector)
Description copied from class: ColumnVector
Set the element in this column vector from the given input vector.

Specified by:
setElement in class ColumnVector

checkPrecisionOverflow

public void checkPrecisionOverflow(int i)
Check if the value at position i fits in the available precision, and convert the value to NULL if it does not.



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