public class RecordReaderImpl extends Object implements RecordReader
| Modifier and Type | Class and Description |
|---|---|
static class |
RecordReaderImpl.PositionProviderImpl |
static class |
RecordReaderImpl.SargApplier |
static class |
RecordReaderImpl.ZeroPositionProvider |
| Modifier and Type | Field and Description |
|---|---|
static OrcProto.ColumnStatistics |
EMPTY_COLUMN_STATISTICS |
protected Path |
path |
protected TypeDescription |
schema |
| Modifier | Constructor and Description |
|---|---|
protected |
RecordReaderImpl(ReaderImpl fileReader,
Reader.Options options) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Release the resources associated with the given reader.
|
static String |
encodeTranslatedSargColumn(int rootColumn,
Integer indexInSourceTable) |
static SearchArgument.TruthValue |
evaluatePredicate(ColumnStatistics stats,
PredicateLeaf predicate,
BloomFilter bloomFilter)
Evaluate a predicate with respect to the statistics from the column
that is referenced in the predicate.
|
static SearchArgument.TruthValue |
evaluatePredicate(ColumnStatistics stats,
PredicateLeaf predicate,
BloomFilter bloomFilter,
boolean useUTCTimestamp)
Evaluate a predicate with respect to the statistics from the column
that is referenced in the predicate.
|
CompressionCodec |
getCompressionCodec() |
int |
getMaxDiskRangeChunkLimit() |
float |
getProgress()
Return the fraction of rows that have been read from the selected.
|
long |
getRowNumber()
Get the row number of the row that will be returned by the following
call to next().
|
static int[] |
mapSargColumnsToOrcInternalColIdx(List<PredicateLeaf> sargLeaves,
SchemaEvolution evolution)
Find the mapping from predicate leaves to columns.
|
static int[] |
mapTranslatedSargColumns(List<OrcProto.Type> types,
List<PredicateLeaf> sargLeaves) |
boolean |
nextBatch(VectorizedRowBatch batch)
Read the next row batch.
|
protected boolean[] |
pickRowGroups()
Pick the row groups that we need to load from the current stripe.
|
OrcIndex |
readRowIndex(int stripeIndex,
boolean[] included,
boolean[] readCols) |
OrcProto.StripeFooter |
readStripeFooter(StripeInformation stripe) |
void |
seekToRow(long rowNumber)
Seek to a particular row number.
|
public static final OrcProto.ColumnStatistics EMPTY_COLUMN_STATISTICS
protected final Path path
protected final TypeDescription schema
protected RecordReaderImpl(ReaderImpl fileReader, Reader.Options options) throws IOException
IOExceptionpublic static int[] mapSargColumnsToOrcInternalColIdx(List<PredicateLeaf> sargLeaves, SchemaEvolution evolution)
sargLeaves - the search argument that we need to mapevolution - the mapping from reader to file schemapublic OrcProto.StripeFooter readStripeFooter(StripeInformation stripe) throws IOException
IOExceptionpublic static SearchArgument.TruthValue evaluatePredicate(ColumnStatistics stats, PredicateLeaf predicate, BloomFilter bloomFilter)
stats - the statistics for the column mentioned in the predicatepredicate - the leaf predicate we need to evaluationpublic static SearchArgument.TruthValue evaluatePredicate(ColumnStatistics stats, PredicateLeaf predicate, BloomFilter bloomFilter, boolean useUTCTimestamp)
stats - the statistics for the column mentioned in the predicatepredicate - the leaf predicate we need to evaluationbloomFilter - useUTCTimestamp - protected boolean[] pickRowGroups()
throws IOException
IOExceptionpublic boolean nextBatch(VectorizedRowBatch batch) throws IOException
RecordReadernextBatch in interface RecordReaderbatch - a row batch object to read intoIOExceptionpublic void close()
throws IOException
RecordReaderclose in interface Closeableclose in interface AutoCloseableclose in interface RecordReaderIOExceptionpublic long getRowNumber()
RecordReadergetRowNumber in interface RecordReaderpublic float getProgress()
getProgress in interface RecordReaderpublic OrcIndex readRowIndex(int stripeIndex, boolean[] included, boolean[] readCols) throws IOException
IOExceptionpublic void seekToRow(long rowNumber)
throws IOException
RecordReaderseekToRow in interface RecordReaderIOExceptionpublic static String encodeTranslatedSargColumn(int rootColumn, Integer indexInSourceTable)
public static int[] mapTranslatedSargColumns(List<OrcProto.Type> types, List<PredicateLeaf> sargLeaves)
public CompressionCodec getCompressionCodec()
public int getMaxDiskRangeChunkLimit()
Copyright © 2013–2023 The Apache Software Foundation. All rights reserved.