Class RecordReaderUtils

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

public class RecordReaderUtils extends Object
Stateless methods shared between RecordReaderImpl and EncodedReaderImpl.
  • Constructor Details

    • RecordReaderUtils

      public RecordReaderUtils()
  • Method Details

    • 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(org.apache.hadoop.hive.common.io.DiskRangeList range)
      Build a string representation of a list of disk ranges.
      Parameters:
      range - ranges to stringify
      Returns:
      the resulting string