public class ManifestReader extends CloseableGroup implements Filterable<FilteredManifest>
Create readers using ManifestFiles.read(ManifestFile, FileIO, Map)
.
CloseableIterable.ConcatCloseableIterable<E>
Modifier and Type | Method and Description |
---|---|
java.util.List<org.apache.iceberg.ManifestEntry> |
addedFiles() |
FilteredManifest |
caseSensitive(boolean caseSensitive)
Sets case sensitivity.
|
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() |
FilteredManifest |
project(Schema fileProjection)
Set the projection from a schema.
|
static ManifestReader |
read(InputFile file)
Deprecated.
will be removed in 0.9.0; use
ManifestFiles.read(ManifestFile, FileIO, Map) instead. |
static ManifestReader |
read(InputFile file,
java.util.function.Function<java.lang.Integer,PartitionSpec> specLookup)
Deprecated.
will be removed in 0.9.0; use
ManifestFiles.read(ManifestFile, FileIO, Map) instead. |
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
caseInsensitive, caseSensitive, select
combine, concat, empty, filter, transform, withNoopClose, withNoopClose
@Deprecated public static ManifestReader read(InputFile file)
ManifestFiles.read(ManifestFile, FileIO, Map)
instead.ManifestReader
for an InputFile
.
Note: Callers should use ManifestFiles.read(ManifestFile, FileIO, Map)
to ensure that
manifest entries with partial metadata can inherit missing properties from the manifest metadata.
file
- an InputFile@Deprecated public static ManifestReader read(InputFile file, java.util.function.Function<java.lang.Integer,PartitionSpec> specLookup)
ManifestFiles.read(ManifestFile, FileIO, Map)
instead.ManifestReader
for an InputFile
.file
- an InputFilespecLookup
- a function to look up the manifest's partition spec by IDpublic 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 project(Schema fileProjection)
Filterable
project
in interface Filterable<FilteredManifest>
fileProjection
- a projection of the DataFile schemapublic 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 FilteredManifest caseSensitive(boolean caseSensitive)
Filterable
caseSensitive
in interface Filterable<FilteredManifest>
caseSensitive
- true if expression binding and schema projection should be case sensitivepublic java.util.List<org.apache.iceberg.ManifestEntry> addedFiles()
public java.util.List<org.apache.iceberg.ManifestEntry> deletedFiles()