/** * Return a stream of the partition parts, filtered by the associated DataSourceFilter. * * @param constraint A constraint which filters the partitions * * @return A stream of availabilities which participate given the constraint */ private Stream<Availability> filteredAvailabilities(PhysicalDataSourceConstraint constraint) { return availabilityFilters.entrySet().stream() .filter(entry -> entry.getValue().apply(constraint)) .map(Map.Entry::getKey); }