public class RecordReaderImpl extends Object implements org.apache.orc.RecordReader
Modifier and Type | Class and Description |
---|---|
static class |
RecordReaderImpl.PositionProviderImpl
An orc PositionProvider impl.
|
static class |
RecordReaderImpl.SargApplier
search argument applier.
|
static class |
RecordReaderImpl.ZeroPositionProvider
An orc PositionProvider impl.
|
Modifier and Type | Field and Description |
---|---|
static org.apache.orc.OrcProto.ColumnStatistics |
EMPTY_COLUMN_STATISTICS |
protected org.apache.hadoop.fs.Path |
path |
protected org.apache.orc.TypeDescription |
schema |
Constructor and Description |
---|
RecordReaderImpl(org.apache.orc.impl.ReaderImpl fileReader,
org.apache.orc.Reader.Options options,
FileIndexResult fileIndexResult) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
static String |
encodeTranslatedSargColumn(int rootColumn,
Integer indexInSourceTable) |
static org.apache.hadoop.hive.ql.io.sarg.SearchArgument.TruthValue |
evaluatePredicate(org.apache.orc.ColumnStatistics stats,
org.apache.hadoop.hive.ql.io.sarg.PredicateLeaf predicate,
org.apache.orc.util.BloomFilter bloomFilter)
Evaluate a predicate with respect to the statistics from the column that is referenced in the
predicate.
|
static org.apache.hadoop.hive.ql.io.sarg.SearchArgument.TruthValue |
evaluatePredicate(org.apache.orc.ColumnStatistics stats,
org.apache.hadoop.hive.ql.io.sarg.PredicateLeaf predicate,
org.apache.orc.util.BloomFilter bloomFilter,
boolean useUTCTimestamp)
Evaluate a predicate with respect to the statistics from the column that is referenced in the
predicate.
|
org.apache.orc.CompressionCodec |
getCompressionCodec() |
int |
getMaxDiskRangeChunkLimit() |
float |
getProgress()
Return the fraction of rows that have been read from the selected.
|
long |
getRowNumber() |
static int[] |
mapSargColumnsToOrcInternalColIdx(List<org.apache.hadoop.hive.ql.io.sarg.PredicateLeaf> sargLeaves,
org.apache.orc.impl.SchemaEvolution evolution)
Find the mapping from predicate leaves to columns.
|
static int[] |
mapTranslatedSargColumns(List<org.apache.orc.OrcProto.Type> types,
List<org.apache.hadoop.hive.ql.io.sarg.PredicateLeaf> sargLeaves) |
boolean |
nextBatch(org.apache.hadoop.hive.ql.exec.vector.VectorizedRowBatch batch) |
protected boolean[] |
pickRowGroups()
Pick the row groups that we need to load from the current stripe.
|
org.apache.orc.impl.OrcIndex |
readRowIndex(int stripeIndex,
boolean[] included,
boolean[] readCols) |
org.apache.orc.OrcProto.StripeFooter |
readStripeFooter(org.apache.orc.StripeInformation stripe) |
void |
seekToRow(long rowNumber) |
public static final org.apache.orc.OrcProto.ColumnStatistics EMPTY_COLUMN_STATISTICS
protected final org.apache.hadoop.fs.Path path
protected final org.apache.orc.TypeDescription schema
public RecordReaderImpl(org.apache.orc.impl.ReaderImpl fileReader, org.apache.orc.Reader.Options options, FileIndexResult fileIndexResult) throws IOException
IOException
public static int[] mapSargColumnsToOrcInternalColIdx(List<org.apache.hadoop.hive.ql.io.sarg.PredicateLeaf> sargLeaves, org.apache.orc.impl.SchemaEvolution evolution)
sargLeaves
- the search argument that we need to mapevolution
- the mapping from reader to file schemapublic org.apache.orc.OrcProto.StripeFooter readStripeFooter(org.apache.orc.StripeInformation stripe) throws IOException
IOException
public static org.apache.hadoop.hive.ql.io.sarg.SearchArgument.TruthValue evaluatePredicate(org.apache.orc.ColumnStatistics stats, org.apache.hadoop.hive.ql.io.sarg.PredicateLeaf predicate, org.apache.orc.util.BloomFilter bloomFilter)
stats
- the statistics for the column mentioned in the predicatepredicate
- the leaf predicate we need to evaluationpublic static org.apache.hadoop.hive.ql.io.sarg.SearchArgument.TruthValue evaluatePredicate(org.apache.orc.ColumnStatistics stats, org.apache.hadoop.hive.ql.io.sarg.PredicateLeaf predicate, org.apache.orc.util.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(org.apache.hadoop.hive.ql.exec.vector.VectorizedRowBatch batch) throws IOException
nextBatch
in interface org.apache.orc.RecordReader
IOException
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in interface org.apache.orc.RecordReader
IOException
public long getRowNumber()
getRowNumber
in interface org.apache.orc.RecordReader
public float getProgress()
getProgress
in interface org.apache.orc.RecordReader
public org.apache.orc.impl.OrcIndex readRowIndex(int stripeIndex, boolean[] included, boolean[] readCols) throws IOException
IOException
public void seekToRow(long rowNumber) throws IOException
seekToRow
in interface org.apache.orc.RecordReader
IOException
public static String encodeTranslatedSargColumn(int rootColumn, Integer indexInSourceTable)
public static int[] mapTranslatedSargColumns(List<org.apache.orc.OrcProto.Type> types, List<org.apache.hadoop.hive.ql.io.sarg.PredicateLeaf> sargLeaves)
public org.apache.orc.CompressionCodec getCompressionCodec()
public int getMaxDiskRangeChunkLimit()
Copyright © 2023–2024 The Apache Software Foundation. All rights reserved.