Package org.apache.iceberg
Class FindFiles.Builder
- java.lang.Object
-
- org.apache.iceberg.FindFiles.Builder
-
- Enclosing class:
- FindFiles
public static class FindFiles.Builder extends java.lang.Object
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FindFiles.BuilderasOfTime(long timestampMillis)Base results on files in the snapshot that was current as of a timestamp.FindFiles.BuildercaseInsensitive()FindFiles.BuildercaseSensitive(boolean findCaseSensitive)CloseableIterable<DataFile>collect()FindFiles.BuilderinPartition(PartitionSpec spec, StructLike partition)Filter results to files in any one of the given partitions.FindFiles.BuilderinPartitions(PartitionSpec spec, java.util.List<StructLike> partitions)Filter results to files in any one of the given partitions.FindFiles.BuilderinPartitions(PartitionSpec spec, StructLike... partitions)Filter results to files in any one of the given partitions.FindFiles.BuilderinSnapshot(long findSnapshotId)Base results on the given snapshot.FindFiles.BuilderwithMetadataMatching(Expression expr)Filter results using a metadata filter for the data in aDataFile.FindFiles.BuilderwithRecordsMatching(Expression expr)Filter results using a record filter.
-
-
-
Constructor Detail
-
Builder
public Builder(Table table)
-
-
Method Detail
-
caseInsensitive
public FindFiles.Builder caseInsensitive()
-
caseSensitive
public FindFiles.Builder caseSensitive(boolean findCaseSensitive)
-
inSnapshot
public FindFiles.Builder inSnapshot(long findSnapshotId)
Base results on the given snapshot.- Parameters:
findSnapshotId- a snapshot ID- Returns:
- this for method chaining
-
asOfTime
public FindFiles.Builder asOfTime(long timestampMillis)
Base results on files in the snapshot that was current as of a timestamp.- Parameters:
timestampMillis- a timestamp in milliseconds- Returns:
- this for method chaining
-
withRecordsMatching
public FindFiles.Builder withRecordsMatching(Expression expr)
Filter results using a record filter. Files that may contain at least one matching record will be returned bycollect().- Parameters:
expr- a record filter- Returns:
- this for method chaining
-
withMetadataMatching
public FindFiles.Builder withMetadataMatching(Expression expr)
Filter results using a metadata filter for the data in aDataFile.- Parameters:
expr- a filter forDataFilemetadata columns- Returns:
- this for method chaining
-
inPartition
public FindFiles.Builder inPartition(PartitionSpec spec, StructLike partition)
Filter results to files in any one of the given partitions.- Parameters:
spec- a spec for the partitionspartition- a StructLike that stores a partition tuple- Returns:
- this for method chaining
-
inPartitions
public FindFiles.Builder inPartitions(PartitionSpec spec, StructLike... partitions)
Filter results to files in any one of the given partitions.- Parameters:
spec- a spec for the partitionspartitions- one or more StructLike that stores a partition tuple- Returns:
- this for method chaining
-
inPartitions
public FindFiles.Builder inPartitions(PartitionSpec spec, java.util.List<StructLike> partitions)
Filter results to files in any one of the given partitions.- Parameters:
spec- a spec for the partitionspartitions- a list of StructLike that stores a partition tuple- Returns:
- this for method chaining
-
collect
public CloseableIterable<DataFile> collect()
- Returns:
- all files in the table that match all of the filters
-
-