Package org.apache.iceberg
Class BaseFileScanTask
java.lang.Object
org.apache.iceberg.BaseFileScanTask
- All Implemented Interfaces:
- Serializable,- ContentScanTask<DataFile>,- FileScanTask,- PartitionScanTask,- ScanTask,- SplittableScanTask<FileScanTask>
- See Also:
- 
Constructor SummaryConstructorsConstructorDescriptionBaseFileScanTask(DataFile file, DeleteFile[] deletes, String schemaString, String specString, ResidualEvaluator residuals) 
- 
Method SummaryModifier and TypeMethodDescriptiondeletes()A list ofdelete filesto apply when reading the task's data file.longThe estimated number of rows produced by this scan task.file()Thefileto scan.intThe number of files that will be opened by this scan task.longlength()The number of bytes to scan from theContentScanTask.start()position in the file.protected FileScanTasknewSplitTask(FileScanTask parentTask, long offset, long length) residual()Returns the residual expression that should be applied to rows in this file scan.schema()Return the schema for this file scan task.protected FileScanTaskself()longThe number of bytes that should be read by this scan task.spec()Returns the spec of the partition for this scan tasksplit(long targetSplitSize) Attempts to split this scan task into several smaller scan tasks, each close tosplitSizesize.longstart()The starting position of this scan range in the file.toString()Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.iceberg.ContentScanTaskestimatedRowsCount, file, length, partition, residual, startMethods inherited from interface org.apache.iceberg.FileScanTaskasFileScanTask, isFileScanTaskMethods inherited from interface org.apache.iceberg.PartitionScanTaskspecMethods inherited from interface org.apache.iceberg.ScanTaskasCombinedScanTask, asDataTask, isDataTaskMethods inherited from interface org.apache.iceberg.SplittableScanTasksplit
- 
Constructor Details- 
BaseFileScanTaskpublic BaseFileScanTask(DataFile file, DeleteFile[] deletes, String schemaString, String specString, ResidualEvaluator residuals) 
 
- 
- 
Method Details- 
self
- 
newSplitTask
- 
deletesDescription copied from interface:FileScanTaskA list ofdelete filesto apply when reading the task's data file.- Specified by:
- deletesin interface- FileScanTask
- Returns:
- a list of delete files to apply
 
- 
sizeBytespublic long sizeBytes()Description copied from interface:ScanTaskThe number of bytes that should be read by this scan task.- Specified by:
- sizeBytesin interface- ContentScanTask<DataFile>
- Specified by:
- sizeBytesin interface- FileScanTask
- Specified by:
- sizeBytesin interface- ScanTask
- Returns:
- the total number of bytes to read
 
- 
filesCountpublic int filesCount()Description copied from interface:ScanTaskThe number of files that will be opened by this scan task.- Specified by:
- filesCountin interface- FileScanTask
- Specified by:
- filesCountin interface- ScanTask
- Returns:
- the number of files to open
 
- 
schemaDescription copied from interface:FileScanTaskReturn the schema for this file scan task.- Specified by:
- schemain interface- FileScanTask
 
- 
fileDescription copied from interface:ContentScanTaskThefileto scan.- Specified by:
- filein interface- ContentScanTask<ThisT extends ContentScanTask<F>>
- Returns:
- the file to scan
 
- 
specDescription copied from interface:PartitionScanTaskReturns the spec of the partition for this scan task- Specified by:
- specin interface- PartitionScanTask
 
- 
startpublic long start()Description copied from interface:ContentScanTaskThe starting position of this scan range in the file.- Specified by:
- startin interface- ContentScanTask<ThisT extends ContentScanTask<F>>
- Returns:
- the start position of this scan range
 
- 
lengthpublic long length()Description copied from interface:ContentScanTaskThe number of bytes to scan from theContentScanTask.start()position in the file.- Specified by:
- lengthin interface- ContentScanTask<ThisT extends ContentScanTask<F>>
- Returns:
- the length of this scan range in bytes
 
- 
residualDescription copied from interface:ContentScanTaskReturns the residual expression that should be applied to rows in this file scan.The residual expression for a file is a filter expression created by partially evaluating the scan's filter using the file's partition data. - Specified by:
- residualin interface- ContentScanTask<ThisT extends ContentScanTask<F>>
- Returns:
- a residual expression to apply to rows from this scan
 
- 
estimatedRowsCountpublic long estimatedRowsCount()Description copied from interface:ScanTaskThe estimated number of rows produced by this scan task.- Specified by:
- estimatedRowsCountin interface- ContentScanTask<ThisT extends ContentScanTask<F>>
- Specified by:
- estimatedRowsCountin interface- ScanTask
- Returns:
- the estimated number of produced rows
 
- 
splitDescription copied from interface:SplittableScanTaskAttempts to split this scan task into several smaller scan tasks, each close tosplitSizesize.Note the target split size is just guidance and the actual split size may be either smaller or larger. File formats like Parquet may leverage the row group offset information while splitting tasks. - Specified by:
- splitin interface- SplittableScanTask<ThisT extends ContentScanTask<F>>
- Parameters:
- targetSplitSize- the target size of each new scan task in bytes
- Returns:
- an Iterable of smaller tasks
 
- 
toString
 
-