Package io.delta.kernel.utils
Class PartitionUtils
Object
io.delta.kernel.utils.PartitionUtils
-
Method Summary
Modifier and TypeMethodDescriptionstatic booleanpartitionExists(Engine engine, Snapshot snapshot, Predicate partitionPredicate) Check if a partition exists (i.e.
-
Method Details
-
partitionExists
public static boolean partitionExists(Engine engine, Snapshot snapshot, Predicate partitionPredicate) Check if a partition exists (i.e. actually has data) in the givenSnapshotbased on the givenPredicate.- Parameters:
engine- theEngineto use for scanning the partition.snapshot- theSnapshotto scan.partitionPredicate- thePredicateto use for filtering the partition.- Returns:
- true if the partition exists, false otherwise.
- Throws:
IllegalArgumentException- if the predicate does not reference any partition columns or if it references any data columns
-