Package org.apache.iceberg
Interface DeletedDataFileScanTask
- All Superinterfaces:
ChangelogScanTask,ContentScanTask<DataFile>,PartitionScanTask,ScanTask,Serializable
A scan task for deletes generated by removing a data file from the table.
Note that all historical delete files added earlier must be applied while reading the data file. This is required to output only those data records that were live when the data file was removed.
Suppose snapshot S1 contains data files F1, F2, F3. Then snapshot S2 adds a position delete file, D1, that deletes records from F2 and snapshot S3 removes F2 entirely. A scan for changes generated by S3 should include the following task:
- DeletedDataFileScanTask(file=F2, existing-deletes=[D1], snapshot=S3)
Readers consuming these tasks should produce deleted records with metadata like change ordinal and commit snapshot ID.
-
Method Summary
Modifier and TypeMethodDescriptionA list of previously addeddelete filesto apply when reading the data file in this task.default intThe number of files that will be opened by this scan task.default ChangelogOperationReturns the type of changes produced by this task (i.e. insert/delete).default longThe number of bytes that should be read by this scan task.Methods inherited from interface org.apache.iceberg.ChangelogScanTask
changeOrdinal, commitSnapshotIdMethods inherited from interface org.apache.iceberg.ContentScanTask
estimatedRowsCount, file, length, partition, residual, startMethods inherited from interface org.apache.iceberg.PartitionScanTask
specMethods inherited from interface org.apache.iceberg.ScanTask
asCombinedScanTask, asDataTask, asFileScanTask, isDataTask, isFileScanTask
-
Method Details
-
existingDeletes
List<DeleteFile> existingDeletes()A list of previously addeddelete filesto apply when reading the data file in this task.- Returns:
- a list of delete files to apply
-
operation
Description copied from interface:ChangelogScanTaskReturns the type of changes produced by this task (i.e. insert/delete).- Specified by:
operationin interfaceChangelogScanTask
-
sizeBytes
default long sizeBytes()Description copied from interface:ScanTaskThe number of bytes that should be read by this scan task.- Specified by:
sizeBytesin interfaceContentScanTask<DataFile>- Specified by:
sizeBytesin interfaceScanTask- Returns:
- the total number of bytes to read
-
filesCount
default int filesCount()Description copied from interface:ScanTaskThe number of files that will be opened by this scan task.- Specified by:
filesCountin interfaceScanTask- Returns:
- the number of files to open
-