Class OrcRecordReader
java.lang.Object
io.trino.orc.OrcRecordReader
- All Implemented Interfaces:
Closeable,AutoCloseable
-
Constructor Summary
ConstructorsConstructorDescriptionOrcRecordReader(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 memoryUsage, Optional<OrcWriteValidation> writeValidation, int initialBatchSize, Function<Exception, RuntimeException> exceptionTransform, OrcReader.FieldMapperFactory fieldMapperFactory) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()longReturn the row position relative to the start of the file.longReturns the total number of rows in the file.longReturns the sum of the largest cells in size from each columnlongReturn the row position within the stripes being read by this reader.longReturns the total number of rows that can possibly be read by this reader.longlongnextPage()
-
Constructor Details
-
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 memoryUsage, Optional<OrcWriteValidation> writeValidation, int initialBatchSize, Function<Exception, throws OrcCorruptionExceptionRuntimeException> exceptionTransform, OrcReader.FieldMapperFactory fieldMapperFactory) - Throws:
OrcCorruptionException
-
-
Method Details
-
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() -
getTotalDataLength
public long getTotalDataLength() -
getMaxCombinedBytesPerRow
public long getMaxCombinedBytesPerRow()Returns the sum of the largest cells in size from each column -
getColumnTypes
-
getStartRowPosition
-
getEndRowPosition
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
nextPage
- Throws:
IOException
-
getUserMetadata
-