DecimalColumnVector (Hive Storage API 2.1.1-pre-orc API)
Date: 2016-10-19

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

## Class DecimalColumnVector

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

-     public class DecimalColumnVector
      extends ColumnVector

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class org.apache.hadoop.hive.ql.exec.vector.ColumnVector

      `ColumnVector.Type`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `short` | `precision`
    `short` | `scale`
    `HiveDecimalWritable[]` | `vector` A vector of HiveDecimalWritable objects.

    - ### Fields inherited from class org.apache.hadoop.hive.ql.exec.vector.ColumnVector

      `isNull, isRepeating, noNulls`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DecimalColumnVector(int precision, int scale)`
    `DecimalColumnVector(int size, int precision, int scale)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `ensureSize(int size, boolean preserveData)` Ensure the ColumnVector can hold at least size values.
    `void` | `fill(HiveDecimal value)`
    `void` | `flatten(boolean selectedInUse, int[] sel, int size)`
    `void` | `set(int elementNum, HiveDecimal hiveDec)`
    `void` | `set(int elementNum, HiveDecimalWritable writeable)`
    `void` | `setElement(int outElementNum, int inputElementNum, ColumnVector inputVector)` Set the element in this column vector from the given input vector.
    `void` | `setNullDataValue(int elementNum)`
    `void` | `stringifyValue(StringBuilder buffer, int row)` Print the value for this column into the given string builder.

    - ### Methods inherited from class org.apache.hadoop.hive.ql.exec.vector.ColumnVector

      `flattenNoNulls, flattenPush, flattenRepeatingNulls, init, reset, setRepeating, unFlatten`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### vector

          public HiveDecimalWritable[] vector

      A vector of HiveDecimalWritable objects. 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

    - #### fill

          public void fill(HiveDecimal 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. This method can assume that the output does not have isRepeating set.
      Specified by:
        `setElement` in class `ColumnVector`

    - #### stringifyValue

          public void stringifyValue(StringBuilder buffer,
                                     int row)

      Description copied from class: `ColumnVector`
      Print the value for this column into the given string builder.
      Specified by:
        `stringifyValue` in class `ColumnVector`
      Parameters:
        `buffer` - the buffer to print into
        `row` - the id of the row to print

    - #### set

          public void set(int elementNum,
                          HiveDecimalWritable writeable)

    - #### set

          public void set(int elementNum,
                          HiveDecimal hiveDec)

    - #### setNullDataValue

          public void setNullDataValue(int elementNum)

    - #### ensureSize

          public void ensureSize(int size,
                                 boolean preserveData)

      Description copied from class: `ColumnVector`
      Ensure the ColumnVector can hold at least size values. This method is deliberately *not* recursive because the complex types can easily have more (or less) children than the upper levels.
      Overrides:
        `ensureSize` in class `ColumnVector`
      Parameters:
        `size` - the new minimum size
        `preserveData` - should the old data be preserved?

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