public class BaseFileScanTask extends java.lang.Object implements FileScanTask
Constructor and Description |
---|
BaseFileScanTask(DataFile file,
DeleteFile[] deletes,
java.lang.String schemaString,
java.lang.String specString,
ResidualEvaluator residuals) |
Modifier and Type | Method and Description |
---|---|
java.util.List<DeleteFile> |
deletes()
A list of
delete files to apply when reading the task's data file. |
long |
estimatedRowsCount()
The estimated number of rows produced by this scan task.
|
F |
file()
The
file to scan. |
int |
filesCount()
The number of files that will be opened by this scan task.
|
long |
length()
The number of bytes to scan from the
ContentScanTask.start() position in the file. |
protected FileScanTask |
newSplitTask(FileScanTask parentTask,
long offset,
long length) |
Expression |
residual()
Returns the residual expression that should be applied to rows in this file scan.
|
Schema |
schema()
Return the schema for this file scan task.
|
protected FileScanTask |
self() |
long |
sizeBytes()
The number of bytes that should be read by this scan task.
|
PartitionSpec |
spec()
Returns the spec of the partition for this scan task
|
java.lang.Iterable<ThisT> |
split(long targetSplitSize)
Attempts to split this scan task into several smaller scan tasks, each close to
splitSize size. |
long |
start()
The starting position of this scan range in the file.
|
java.lang.String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
asFileScanTask, isFileScanTask
estimatedRowsCount, file, length, partition, residual, start
spec
asCombinedScanTask, asDataTask, isDataTask
split
public BaseFileScanTask(DataFile file, DeleteFile[] deletes, java.lang.String schemaString, java.lang.String specString, ResidualEvaluator residuals)
protected FileScanTask self()
protected FileScanTask newSplitTask(FileScanTask parentTask, long offset, long length)
public java.util.List<DeleteFile> deletes()
FileScanTask
delete files
to apply when reading the task's data file.deletes
in interface FileScanTask
public long sizeBytes()
ScanTask
sizeBytes
in interface ContentScanTask<DataFile>
sizeBytes
in interface FileScanTask
sizeBytes
in interface ScanTask
public int filesCount()
ScanTask
filesCount
in interface FileScanTask
filesCount
in interface ScanTask
public Schema schema()
FileScanTask
schema
in interface FileScanTask
public F file()
ContentScanTask
file
to scan.file
in interface ContentScanTask<F extends ContentFile<F>>
public PartitionSpec spec()
PartitionScanTask
spec
in interface PartitionScanTask
public long start()
ContentScanTask
start
in interface ContentScanTask<F extends ContentFile<F>>
public long length()
ContentScanTask
ContentScanTask.start()
position in the file.length
in interface ContentScanTask<F extends ContentFile<F>>
public Expression residual()
ContentScanTask
The residual expression for a file is a filter expression created by partially evaluating the scan's filter using the file's partition data.
residual
in interface ContentScanTask<F extends ContentFile<F>>
public long estimatedRowsCount()
ScanTask
estimatedRowsCount
in interface ContentScanTask<F extends ContentFile<F>>
estimatedRowsCount
in interface ScanTask
public java.lang.Iterable<ThisT> split(long targetSplitSize)
SplittableScanTask
splitSize
size.
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.
split
in interface SplittableScanTask<ThisT extends ContentScanTask<F>>
targetSplitSize
- the target size of each new scan task in bytespublic java.lang.String toString()
toString
in class java.lang.Object