RecordReaderUtils (ORC Core 1.6.5 API)
Date: 2020-10-01

org.apache.orc.impl

## Class RecordReaderUtils

- java.lang.Object
- - org.apache.orc.impl.RecordReaderUtils

-     public class RecordReaderUtils
      extends Object

  Stateless methods shared between RecordReaderImpl and EncodedReaderImpl.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `RecordReaderUtils.ByteBufferAllocatorPool`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `RecordReaderUtils()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static DataReader` | `createDefaultDataReader(DataReaderProperties properties)`
    `static long` | `estimateRgEndOffset(boolean isCompressed, int bufferSize, boolean isLast, long nextGroupOffset, long streamLength)`
    `static int` | `getIndexPosition(OrcProto.ColumnEncoding.Kind columnEncoding, TypeDescription.Category columnType, OrcProto.Stream.Kind streamType, boolean isCompressed, boolean hasNulls)` Get the offset in the index positions for the column that the given stream starts.
    `static boolean` | `isDictionary(OrcProto.Stream.Kind kind, OrcProto.ColumnEncoding encoding)` Is this stream part of a dictionary?
    `static String` | `stringifyDiskRanges(DiskRangeList range)` Build a string representation of a list of disk ranges.

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

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

- - ### Constructor Detail

    - #### RecordReaderUtils

          public RecordReaderUtils()

  - ### Method Detail

    - #### createDefaultDataReader

          public static DataReader createDefaultDataReader(DataReaderProperties properties)

    - #### estimateRgEndOffset

          public static long estimateRgEndOffset(boolean isCompressed,
                                                 int bufferSize,
                                                 boolean isLast,
                                                 long nextGroupOffset,
                                                 long streamLength)

    - #### getIndexPosition

          public static int getIndexPosition(OrcProto.ColumnEncoding.Kind columnEncoding,
                                             TypeDescription.Category columnType,
                                             OrcProto.Stream.Kind streamType,
                                             boolean isCompressed,
                                             boolean hasNulls)

      Get the offset in the index positions for the column that the given stream starts.
      Parameters:
        `columnEncoding` - the encoding of the column
        `columnType` - the type of the column
        `streamType` - the kind of the stream
        `isCompressed` - is the stream compressed?
        `hasNulls` - does the column have a PRESENT stream?
      Returns:
        the number of positions that will be used for that stream

    - #### isDictionary

          public static boolean isDictionary(OrcProto.Stream.Kind kind,
                                             OrcProto.ColumnEncoding encoding)

      Is this stream part of a dictionary?
      Returns:
        is this part of a dictionary?

    - #### stringifyDiskRanges

          public static String stringifyDiskRanges(DiskRangeList range)

      Build a string representation of a list of disk ranges.
      Parameters:
        `range` - ranges to stringify
      Returns:
        the resulting string

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