public class RecordReaderImpl extends Object implements RecordReader
Modifier and Type | Class and Description |
---|---|
static class |
RecordReaderImpl.PositionProviderImpl |
static class |
RecordReaderImpl.SargApplier |
Modifier and Type | Field and Description |
---|---|
protected org.apache.hadoop.fs.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,
BloomFilterIO bloomFilter)
Evaluate a predicate with respect to the statistics from the column
that is referenced in the predicate.
|
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,
String[] columnNames,
int rootColumn)
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) |
OrcIndex |
readRowIndex(int stripeIndex,
boolean[] included,
OrcProto.RowIndex[] indexes,
OrcProto.BloomFilterIndex[] bloomFilterIndex,
boolean[] sargColumns) |
OrcProto.StripeFooter |
readStripeFooter(StripeInformation stripe) |
void |
seekToRow(long rowNumber)
Seek to a particular row number.
|
protected final org.apache.hadoop.fs.Path path
protected final TypeDescription schema
protected RecordReaderImpl(ReaderImpl fileReader, Reader.Options options) throws IOException
IOException
public static int[] mapSargColumnsToOrcInternalColIdx(List<PredicateLeaf> sargLeaves, String[] columnNames, int rootColumn)
sargLeaves
- the search argument that we need to mapcolumnNames
- the names of the columnsrootColumn
- the offset of the top level row, which offsets the
resultpublic OrcProto.StripeFooter readStripeFooter(StripeInformation stripe) throws IOException
IOException
public static SearchArgument.TruthValue evaluatePredicate(ColumnStatistics stats, PredicateLeaf predicate, BloomFilterIO bloomFilter)
stats
- the statistics for the column mentioned in the predicatepredicate
- the leaf predicate we need to evaluationprotected 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 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 OrcIndex readRowIndex(int stripeIndex, boolean[] included, OrcProto.RowIndex[] indexes, OrcProto.BloomFilterIndex[] bloomFilterIndex, 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)
Copyright © 2016 The Apache Software Foundation. All rights reserved.