evaluate_predicate_on_partition#
- PathPartitionParser.evaluate_predicate_on_partition(path: str, predicate: Expr, *, schema: pyarrow.Schema | None = None) bool[source]#
Evaluate a predicate expression against partition values from a path.
This method enables partition pruning by evaluating predicates that reference partition columns against the partition values parsed from file paths.
- Parameters:
path (str) – File path to parse partition values from.
predicate (Expr) – Expression that references partition columns.
schema (pyarrow.Schema | None) – Logical schema used to cast path values to the reader’s types. If omitted, infer types from the parsed values as before.
- Returns:
True if the partition satisfies the predicate (should read the file), False if it doesn’t (can skip the file for partition pruning).
- Return type: