TreeReaderFactory.TreeReader (ORC Core 1.6.6 API)
Date: 2021-01-13

org.apache.orc.impl

## Class TreeReaderFactory.TreeReader

- java.lang.Object
- - org.apache.orc.impl.TreeReaderFactory.TreeReader

- Direct Known Subclasses:
    ConvertTreeReaderFactory.ConvertTreeReader, TreeReaderFactory.BinaryTreeReader, TreeReaderFactory.BooleanTreeReader, TreeReaderFactory.ByteTreeReader, TreeReaderFactory.DateTreeReader, TreeReaderFactory.Decimal64TreeReader, TreeReaderFactory.DecimalTreeReader, TreeReaderFactory.DoubleTreeReader, TreeReaderFactory.FloatTreeReader, TreeReaderFactory.IntTreeReader, TreeReaderFactory.ListTreeReader, TreeReaderFactory.LongTreeReader, TreeReaderFactory.MapTreeReader, TreeReaderFactory.NullTreeReader, TreeReaderFactory.ShortTreeReader, TreeReaderFactory.StringDictionaryTreeReader, TreeReaderFactory.StringDirectTreeReader, TreeReaderFactory.StringTreeReader, TreeReaderFactory.StructTreeReader, TreeReaderFactory.TimestampTreeReader, TreeReaderFactory.UnionTreeReader
  Enclosing class:
    TreeReaderFactory

      public abstract static class TreeReaderFactory.TreeReader
      extends Object

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected int` | `columnId`
    `protected TreeReaderFactory.Context` | `context`
    `protected BitFieldReader` | `present`
    `protected int` | `vectorColumnCount`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `TreeReader(int columnId, InStream in, TreeReaderFactory.Context context)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected long` | `countNonNulls(long rows)`
    `protected static IntegerReader` | `createIntegerReader(OrcProto.ColumnEncoding.Kind kind, InStream in, boolean signed, TreeReaderFactory.Context context)`
    `int` | `getColumnId()`
    `BitFieldReader` | `getPresent()`
    `void` | `nextBatch(VectorizedRowBatch batch, int batchSize)` Called at the top level to read into the given batch.
    `void` | `nextVector(ColumnVector previous, boolean[] isNull, int batchSize)` Populates the isNull vector array in the previousVector object based on the present stream values.
    `void` | `seek(PositionProvider index)`
    `void` | `seek(PositionProvider[] index)` Seek to the given position.

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

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

- - ### Field Detail

    - #### columnId

          protected final int columnId

    - #### present

          protected BitFieldReader present

    - #### vectorColumnCount

          protected int vectorColumnCount

    - #### context

          protected final TreeReaderFactory.Context context

  - ### Constructor Detail

    - #### TreeReader

          protected TreeReader(int columnId,
                               InStream in,
                               TreeReaderFactory.Context context)
                        throws IOException

      Throws:
        `IOException`

  - ### Method Detail

    - #### createIntegerReader

          protected static IntegerReader createIntegerReader(OrcProto.ColumnEncoding.Kind kind,
                                                             InStream in,
                                                             boolean signed,
                                                             TreeReaderFactory.Context context)
                                                      throws IOException

      Throws:
        `IOException`

    - #### seek

          public void seek(PositionProvider[] index)
                    throws IOException

      Seek to the given position.
      Parameters:
        `index` - the indexes loaded from the file
      Throws:
        `IOException`

    - #### seek

          public void seek(PositionProvider index)
                    throws IOException

      Throws:
        `IOException`

    - #### countNonNulls

          protected long countNonNulls(long rows)
                                throws IOException

      Throws:
        `IOException`

    - #### nextBatch

          public void nextBatch(VectorizedRowBatch batch,
                                int batchSize)
                         throws IOException

      Called at the top level to read into the given batch.
      Parameters:
        `batch` - the batch to read into
        `batchSize` - the number of rows to read
      Throws:
        `IOException`

    - #### nextVector

          public void nextVector(ColumnVector previous,
                                 boolean[] isNull,
                                 int batchSize)
                          throws IOException

      Populates the isNull vector array in the previousVector object based on the present stream values. This function is called from all the child readers, and they all set the values based on isNull field value.
      Parameters:
        `previous` - The columnVector object whose isNull value is populated
        `isNull` - Whether the each value was null at a higher level. If isNull is null, all values are non-null.
        `batchSize` - Size of the column vector
      Throws:
        `IOException`

    - #### getPresent

          public BitFieldReader getPresent()

    - #### getColumnId

          public int getColumnId()

Copyright © 2013–2021 The Apache Software Foundation. All rights reserved.