Package org.apache.orc.impl
Class RecordReaderUtils
java.lang.Object
org.apache.orc.impl.RecordReaderUtils
Stateless methods shared between RecordReaderImpl and EncodedReaderImpl.
-
Nested Class Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic 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
(org.apache.hadoop.hive.common.io.DiskRangeList range) Build a string representation of a list of disk ranges.
-
Constructor Details
-
RecordReaderUtils
public RecordReaderUtils()
-
-
Method Details
-
createDefaultDataReader
-
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 columncolumnType
- the type of the columnstreamType
- the kind of the streamisCompressed
- 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
Is this stream part of a dictionary?- Returns:
- is this part of a dictionary?
-
stringifyDiskRanges
Build a string representation of a list of disk ranges.- Parameters:
range
- ranges to stringify- Returns:
- the resulting string
-