ray.data.datasource.PathPartitionParser.evaluate_predicate_on_partition#

PathPartitionParser.evaluate_predicate_on_partition(path: str, predicate: Expr) 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 – File path to parse partition values from.

  • predicate – Expression that references partition columns.

Returns:

True if the partition satisfies the predicate (should read the file), False if it doesn’t (can skip the file for partition pruning).