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

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

public class DoubleColumnVector
extends ColumnVector

This class represents a nullable double precision floating point column vector. This class will be used for operations on all floating point types (float, double) and as such will use a 64-bit double value to hold the biggest possible value. During copy-in/copy-out, smaller types (i.e. float) will be converted as needed. This will reduce the amount of code that needs to be generated and also will run fast since the machine operates with 64-bit words. The vector[] field is public by design for high-performance access in the inner loop of query execution.


Field Summary
static double NULL_VALUE
           
 double[] vector
           
 
Fields inherited from class org.apache.hadoop.hive.ql.exec.vector.ColumnVector
isNull, isRepeating, noNulls
 
Constructor Summary
DoubleColumnVector()
          Use this constructor by default.
DoubleColumnVector(int len)
          Don't use this except for testing purposes.
 
Method Summary
 void copySelected(boolean selectedInUse, int[] sel, int size, DoubleColumnVector output)
           
 void fill(double value)
           
 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 double[] vector

NULL_VALUE

public static final double NULL_VALUE
See Also:
Constant Field Values
Constructor Detail

DoubleColumnVector

public DoubleColumnVector()
Use this constructor by default. All column vectors should normally be the default size.


DoubleColumnVector

public DoubleColumnVector(int len)
Don't use this except for testing purposes.

Parameters:
len -
Method Detail

getWritableObject

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

copySelected

public void copySelected(boolean selectedInUse,
                         int[] sel,
                         int size,
                         DoubleColumnVector output)

fill

public void fill(double value)

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


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