Package org.apache.iceberg
Class BaseFileScanTask
- java.lang.Object
-
- org.apache.iceberg.BaseFileScanTask
-
- All Implemented Interfaces:
java.io.Serializable
,ContentScanTask<DataFile>
,FileScanTask
,ScanTask
,SplittableScanTask<FileScanTask>
public class BaseFileScanTask extends java.lang.Object implements FileScanTask
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description BaseFileScanTask(DataFile file, DeleteFile[] deletes, java.lang.String schemaString, java.lang.String specString, ResidualEvaluator residuals)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<DeleteFile>
deletes()
A list ofdelete files
to apply when reading the task's data file.DataFile
file()
Thefile
to scan.long
length()
The number of bytes to scan from theContentScanTask.start()
position in the file.Expression
residual()
Returns the residual expression that should be applied to rows in this file scan.PartitionSpec
spec()
Thespec
used to store this file.java.lang.Iterable<FileScanTask>
split(long targetSplitSize)
Attempts to split this scan task into several smaller scan tasks, each close tosplitSize
size.long
start()
The starting position of this scan range in the file.java.lang.String
toString()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.iceberg.FileScanTask
asFileScanTask, filesCount, isFileScanTask, sizeBytes
-
Methods inherited from interface org.apache.iceberg.ScanTask
asCombinedScanTask, asDataTask, isDataTask
-
-
-
-
Constructor Detail
-
BaseFileScanTask
public BaseFileScanTask(DataFile file, DeleteFile[] deletes, java.lang.String schemaString, java.lang.String specString, ResidualEvaluator residuals)
-
-
Method Detail
-
file
public DataFile file()
Description copied from interface:ContentScanTask
Thefile
to scan.- Specified by:
file
in interfaceContentScanTask<DataFile>
- Returns:
- the file to scan
-
deletes
public java.util.List<DeleteFile> deletes()
Description copied from interface:FileScanTask
A list ofdelete files
to apply when reading the task's data file.- Specified by:
deletes
in interfaceFileScanTask
- Returns:
- a list of delete files to apply
-
spec
public PartitionSpec spec()
Description copied from interface:ContentScanTask
Thespec
used to store this file.- Specified by:
spec
in interfaceContentScanTask<DataFile>
- Returns:
- the partition spec from this file's manifest
-
start
public long start()
Description copied from interface:ContentScanTask
The starting position of this scan range in the file.- Specified by:
start
in interfaceContentScanTask<DataFile>
- Returns:
- the start position of this scan range
-
length
public long length()
Description copied from interface:ContentScanTask
The number of bytes to scan from theContentScanTask.start()
position in the file.- Specified by:
length
in interfaceContentScanTask<DataFile>
- Returns:
- the length of this scan range in bytes
-
residual
public Expression residual()
Description copied from interface:ContentScanTask
Returns 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:
residual
in interfaceContentScanTask<DataFile>
- Returns:
- a residual expression to apply to rows from this scan
-
split
public java.lang.Iterable<FileScanTask> split(long targetSplitSize)
Description copied from interface:SplittableScanTask
Attempts to split this scan task into several smaller scan tasks, each close tosplitSize
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.
- Specified by:
split
in interfaceSplittableScanTask<FileScanTask>
- Parameters:
targetSplitSize
- the target size of each new scan task in bytes- Returns:
- an Iterable of smaller tasks
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-