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 |
---|---|
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[] sargColumns) |
OrcProto.StripeFooter |
readStripeFooter(StripeInformation stripe) |
void |
seekToRow(long rowNumber)
Seek to a particular row number.
|
protected final Path path
protected final TypeDescription schema
protected RecordReaderImpl(ReaderImpl fileReader, Reader.Options options) throws IOException
IOException
public 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
IOException
public 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
IOException
public boolean nextBatch(VectorizedRowBatch batch) throws IOException
RecordReader
nextBatch
in interface RecordReader
batch
- a row batch object to read intoIOException
public void close() throws IOException
RecordReader
close
in interface Closeable
close
in interface AutoCloseable
close
in interface RecordReader
IOException
public long getRowNumber()
RecordReader
getRowNumber
in interface RecordReader
public float getProgress()
getProgress
in interface RecordReader
public OrcIndex readRowIndex(int stripeIndex, boolean[] included, boolean[] sargColumns) throws IOException
IOException
public void seekToRow(long rowNumber) throws IOException
RecordReader
seekToRow
in interface RecordReader
IOException
public 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–2021 The Apache Software Foundation. All rights reserved.