Package io.delta.kernel.utils
Class PartitionUtils
Object
io.delta.kernel.utils.PartitionUtils
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
partitionExists
(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 givenSnapshot
based on the givenPredicate
.- Parameters:
engine
- theEngine
to use for scanning the partition.snapshot
- theSnapshot
to scan.partitionPredicate
- thePredicate
to 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
-