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

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

## Class IntervalDayTimeColumnVector

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

-     public class IntervalDayTimeColumnVector
      extends ColumnVector

  This class represents a nullable interval day time column vector capable of handing a wide range of interval day time values. We store the 2 (value) fields of a HiveIntervalDayTime class in primitive arrays. We do this to avoid an array of Java HiveIntervalDayTime objects which would have poor storage and memory access characteristics. Generally, the caller will fill in a scratch HiveIntervalDayTime object with values from a row, work using the scratch HiveIntervalDayTime, and then perhaps update the column vector row with a result.

- - ### Nested Class Summary

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

      `ColumnVector.Type`

  - ### Field Summary

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

      `isNull, isRepeating, noNulls`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `IntervalDayTimeColumnVector()` Use this constructor by default.
    `IntervalDayTimeColumnVector(int len)` Don't use this except for testing purposes.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `HiveIntervalDayTime` | `asScratchIntervalDayTime(int elementNum)` Return the scratch HiveIntervalDayTime object set from a row.
    `int` | `compareTo(HiveIntervalDayTime intervalDayTime, int elementNum)` Compare HiveIntervalDayTime to row.
    `int` | `compareTo(IntervalDayTimeColumnVector intervalDayTimeColVector1, int elementNum1, int elementNum2)` Compare another TimestampColumnVector's row to a row.
    `int` | `compareTo(int elementNum, HiveIntervalDayTime intervalDayTime)` Compare row to HiveIntervalDayTime.
    `int` | `compareTo(int elementNum1, IntervalDayTimeColumnVector intervalDayTimeColVector2, int elementNum2)` Compare a row to another TimestampColumnVector's row.
    `void` | `copySelected(boolean selectedInUse, int[] sel, int size, IntervalDayTimeColumnVector output)`
    `void` | `ensureSize(int size, boolean preserveData)` Ensure the ColumnVector can hold at least size values.
    `void` | `fill(HiveIntervalDayTime intervalDayTime)` Fill all the vector entries with a HiveIntervalDayTime.
    `void` | `flatten(boolean selectedInUse, int[] sel, int size)`
    `double` | `getDouble(int elementNum)` Return a row's HiveIntervalDayTime.getDouble() value.
    `int` | `getLength()` Return the number of rows.
    `long` | `getNanos(int elementNum)` Return a row's HiveIntervalDayTime.getNanos() value.
    `HiveIntervalDayTime` | `getScratchIntervalDayTime()` Return the scratch HiveIntervalDayTime (contents undefined).
    `org.apache.hadoop.io.Writable` | `getScratchWritable()` Return a convenience writable object stored by this column vector.
    `long` | `getTotalSeconds(int elementNum)` Return a row's HiveIntervalDayTime.getTotalSeconds() value.
    `void` | `intervalDayTimeUpdate(HiveIntervalDayTime intervalDayTime, int elementNum)` Set a HiveIntervalDayTime object from a row of the column.
    `void` | `set(int elementNum, HiveIntervalDayTime intervalDayTime)` Set a row from a HiveIntervalDayTime.
    `void` | `setElement(int outElementNum, int inputElementNum, ColumnVector inputVector)` Set the element in this column vector from the given input vector.
    `void` | `setFromScratchIntervalDayTime(int elementNum)` Set a row from the current value in the scratch interval day time.
    `void` | `setNullValue(int elementNum)` Set row to standard null value(s).
    `void` | `setScratchWritable(org.apache.hadoop.io.Writable scratchWritable)` Set the convenience writable object stored by this column vector
    `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`

- - ### Constructor Detail

    - #### IntervalDayTimeColumnVector

          public IntervalDayTimeColumnVector()

      Use this constructor by default. All column vectors should normally be the default size.

    - #### IntervalDayTimeColumnVector

          public IntervalDayTimeColumnVector(int len)

      Don't use this except for testing purposes.
      Parameters:
        `len` - the number of rows

  - ### Method Detail

    - #### getLength

          public int getLength()

      Return the number of rows.
      Returns:

    - #### getTotalSeconds

          public long getTotalSeconds(int elementNum)

      Return a row's HiveIntervalDayTime.getTotalSeconds() value. We assume the entry has already been NULL checked and isRepeated adjusted.
      Parameters:
        `elementNum` -
      Returns:

    - #### getNanos

          public long getNanos(int elementNum)

      Return a row's HiveIntervalDayTime.getNanos() value. We assume the entry has already been NULL checked and isRepeated adjusted.
      Parameters:
        `elementNum` -
      Returns:

    - #### getDouble

          public double getDouble(int elementNum)

      Return a row's HiveIntervalDayTime.getDouble() value. We assume the entry has already been NULL checked and isRepeated adjusted.
      Parameters:
        `elementNum` -
      Returns:

    - #### intervalDayTimeUpdate

          public void intervalDayTimeUpdate(HiveIntervalDayTime intervalDayTime,
                                            int elementNum)

      Set a HiveIntervalDayTime object from a row of the column. We assume the entry has already been NULL checked and isRepeated adjusted.
      Parameters:
        `intervalDayTime` -
        `elementNum` -

    - #### asScratchIntervalDayTime

          public HiveIntervalDayTime asScratchIntervalDayTime(int elementNum)

      Return the scratch HiveIntervalDayTime object set from a row. We assume the entry has already been NULL checked and isRepeated adjusted.
      Parameters:
        `elementNum` -
      Returns:

    - #### getScratchIntervalDayTime

          public HiveIntervalDayTime getScratchIntervalDayTime()

      Return the scratch HiveIntervalDayTime (contents undefined).
      Returns:

    - #### compareTo

          public int compareTo(int elementNum,
                               HiveIntervalDayTime intervalDayTime)

      Compare row to HiveIntervalDayTime. We assume the entry has already been NULL checked and isRepeated adjusted.
      Parameters:
        `elementNum` -
        `intervalDayTime` -
      Returns:
        -1, 0, 1 standard compareTo values.

    - #### compareTo

          public int compareTo(HiveIntervalDayTime intervalDayTime,
                               int elementNum)

      Compare HiveIntervalDayTime to row. We assume the entry has already been NULL checked and isRepeated adjusted.
      Parameters:
        `intervalDayTime` -
        `elementNum` -
      Returns:
        -1, 0, 1 standard compareTo values.

    - #### compareTo

          public int compareTo(int elementNum1,
                               IntervalDayTimeColumnVector intervalDayTimeColVector2,
                               int elementNum2)

      Compare a row to another TimestampColumnVector's row.
      Parameters:
        `elementNum1` -
        `intervalDayTimeColVector2` -
        `elementNum2` -
      Returns:

    - #### compareTo

          public int compareTo(IntervalDayTimeColumnVector intervalDayTimeColVector1,
                               int elementNum1,
                               int elementNum2)

      Compare another TimestampColumnVector's row to a row.
      Parameters:
        `intervalDayTimeColVector1` -
        `elementNum1` -
        `elementNum2` -
      Returns:

    - #### 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`

    - #### flatten

          public void flatten(boolean selectedInUse,
                              int[] sel,
                              int size)

      Specified by:
        `flatten` in class `ColumnVector`

    - #### set

          public void set(int elementNum,
                          HiveIntervalDayTime intervalDayTime)

      Set a row from a HiveIntervalDayTime. We assume the entry has already been isRepeated adjusted.
      Parameters:
        `elementNum` -
        `intervalDayTime` -

    - #### setFromScratchIntervalDayTime

          public void setFromScratchIntervalDayTime(int elementNum)

      Set a row from the current value in the scratch interval day time.
      Parameters:
        `elementNum` -

    - #### setNullValue

          public void setNullValue(int elementNum)

      Set row to standard null value(s). We assume the entry has already been isRepeated adjusted.
      Parameters:
        `elementNum` -

    - #### copySelected

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

    - #### fill

          public void fill(HiveIntervalDayTime intervalDayTime)

      Fill all the vector entries with a HiveIntervalDayTime.
      Parameters:
        `intervalDayTime` -

    - #### getScratchWritable

          public org.apache.hadoop.io.Writable getScratchWritable()

      Return a convenience writable object stored by this column vector. Supports keeping a TimestampWritable object without having to import that definition...
      Returns:

    - #### setScratchWritable

          public void setScratchWritable(org.apache.hadoop.io.Writable scratchWritable)

      Set the convenience writable object stored by this column vector
      Parameters:
        `scratchWritable` -

    - #### 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

    - #### 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.