Package io.trino.orc
Class OrcRecordReader
- java.lang.Object
-
- io.trino.orc.OrcRecordReader
-
- All Implemented Interfaces:
Closeable,AutoCloseable
public class OrcRecordReader extends Object implements Closeable
-
-
Constructor Summary
Constructors Constructor Description OrcRecordReader(List<OrcColumn> readColumns, List<Type> readTypes, List<OrcReader.ProjectedLayout> readLayouts, OrcPredicate predicate, long numberOfRows, List<StripeInformation> fileStripes, Optional<ColumnMetadata<ColumnStatistics>> fileStats, List<Optional<StripeStatistics>> stripeStats, OrcDataSource orcDataSource, long splitOffset, long splitLength, ColumnMetadata<OrcType> orcTypes, Optional<OrcDecompressor> decompressor, OptionalInt rowsInRowGroup, org.joda.time.DateTimeZone legacyFileTimeZone, PostScript.HiveWriterVersion hiveWriterVersion, MetadataReader metadataReader, OrcReaderOptions options, Map<String,io.airlift.slice.Slice> userMetadata, AggregatedMemoryContext systemMemoryUsage, Optional<OrcWriteValidation> writeValidation, int initialBatchSize, Function<Exception,RuntimeException> exceptionTransform, OrcReader.FieldMapperFactory fieldMapperFactory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()ColumnMetadata<OrcType>getColumnTypes()longgetFilePosition()Return the row position relative to the start of the file.longgetFileRowCount()Returns the total number of rows in the file.longgetMaxCombinedBytesPerRow()Returns the sum of the largest cells in size from each columnlonggetReaderPosition()Return the row position within the stripes being read by this reader.longgetReaderRowCount()Returns the total number of rows that can possibly be read by this reader.longgetSplitLength()Map<String,io.airlift.slice.Slice>getUserMetadata()PagenextPage()
-
-
-
Constructor Detail
-
OrcRecordReader
public OrcRecordReader(List<OrcColumn> readColumns, List<Type> readTypes, List<OrcReader.ProjectedLayout> readLayouts, OrcPredicate predicate, long numberOfRows, List<StripeInformation> fileStripes, Optional<ColumnMetadata<ColumnStatistics>> fileStats, List<Optional<StripeStatistics>> stripeStats, OrcDataSource orcDataSource, long splitOffset, long splitLength, ColumnMetadata<OrcType> orcTypes, Optional<OrcDecompressor> decompressor, OptionalInt rowsInRowGroup, org.joda.time.DateTimeZone legacyFileTimeZone, PostScript.HiveWriterVersion hiveWriterVersion, MetadataReader metadataReader, OrcReaderOptions options, Map<String,io.airlift.slice.Slice> userMetadata, AggregatedMemoryContext systemMemoryUsage, Optional<OrcWriteValidation> writeValidation, int initialBatchSize, Function<Exception,RuntimeException> exceptionTransform, OrcReader.FieldMapperFactory fieldMapperFactory) throws OrcCorruptionException
- Throws:
OrcCorruptionException
-
-
Method Detail
-
getFilePosition
public long getFilePosition()
Return the row position relative to the start of the file.
-
getFileRowCount
public long getFileRowCount()
Returns the total number of rows in the file. This count includes rows for stripes that were completely excluded due to stripe statistics.
-
getReaderPosition
public long getReaderPosition()
Return the row position within the stripes being read by this reader. This position will include rows that were never read due to row groups that are excluded due to row group statistics. Thus, it will advance faster than the number of rows actually read.
-
getReaderRowCount
public long getReaderRowCount()
Returns the total number of rows that can possibly be read by this reader. This count may be fewer than the number of rows in the file if some stripes were excluded due to stripe statistics, but may be more than the number of rows read if some row groups are excluded due to statistics.
-
getSplitLength
public long getSplitLength()
-
getMaxCombinedBytesPerRow
public long getMaxCombinedBytesPerRow()
Returns the sum of the largest cells in size from each column
-
getColumnTypes
public ColumnMetadata<OrcType> getColumnTypes()
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
nextPage
public Page nextPage() throws IOException
- Throws:
IOException
-
-