public class ManifestReader extends CloseableGroup implements Filterable<FilteredManifest>
Readers are created using the builder from read(InputFile, Function)
.
CloseableIterable.ConcatCloseableIterable<E>
Modifier and Type | Method and Description |
---|---|
java.util.List<org.apache.iceberg.ManifestEntry> |
addedFiles() |
ManifestReader |
caseSensitive(boolean readCaseSensitive)
Returns a new
ManifestReader that, if filtered via select(java.util.Collection) ,
filterPartitions(Expression) or filterRows(Expression) , will apply the specified
case sensitivity for column name matching. |
java.util.List<org.apache.iceberg.ManifestEntry> |
deletedFiles() |
InputFile |
file() |
FilteredManifest |
filterPartitions(Expression expr)
Adds a filter expression on partition data for matching files.
|
FilteredManifest |
filterRows(Expression expr)
Adds a filter expression on data rows for matching files.
|
java.util.Iterator<DataFile> |
iterator() |
static ManifestReader |
read(InputFile file,
java.util.function.Function<java.lang.Integer,PartitionSpec> specLookup)
Returns a new
ManifestReader for an InputFile . |
Schema |
schema() |
FilteredManifest |
select(java.util.Collection<java.lang.String> columns)
Selects the columns of a file manifest to read.
|
PartitionSpec |
spec() |
addCloseable, close
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
select
combine, concat, empty, transform, withNoopClose
public static ManifestReader read(InputFile file, java.util.function.Function<java.lang.Integer,PartitionSpec> specLookup)
ManifestReader
for an InputFile
.file
- an InputFilespecLookup
- a function to look up the manifest's partition spec by IDpublic ManifestReader caseSensitive(boolean readCaseSensitive)
ManifestReader
that, if filtered via select(java.util.Collection)
,
filterPartitions(Expression)
or filterRows(Expression)
, will apply the specified
case sensitivity for column name matching.readCaseSensitive
- whether column name matching should have case sensitivitypublic InputFile file()
public Schema schema()
public PartitionSpec spec()
public FilteredManifest select(java.util.Collection<java.lang.String> columns)
Filterable
If columns are set multiple times, the last set of columns will be read.
If the Filterable object has partition filters, they will be added to the returned partial.
For a list of column names, see the table format specification.
select
in interface Filterable<FilteredManifest>
columns
- String column names to load from the manifest filepublic FilteredManifest filterPartitions(Expression expr)
Filterable
If the Filterable object already has partition filters, the new filter will be added as an additional requirement. The result filter expression will be the result of expr and any existing filters.
If the Filterable object has columns selected, they will be added to the returned partial.
filterPartitions
in interface Filterable<FilteredManifest>
expr
- An expression for filtering this Filterable using partition datapublic FilteredManifest filterRows(Expression expr)
Filterable
Expressions passed to this function will be converted to partition expressions before they are used to filter data files.
If the Filterable object already has partition filters, the new filter will be added as an additional requirement. The result filter expression will be the result of expr and any existing filters.
If the Filterable object has columns selected, they will be added to the returned partial.
filterRows
in interface Filterable<FilteredManifest>
expr
- An expression for filtering this Filterable using row datapublic java.util.List<org.apache.iceberg.ManifestEntry> addedFiles()
public java.util.List<org.apache.iceberg.ManifestEntry> deletedFiles()