fn create_filter(predicate: &BooleanArray, optimize: bool) -> FilterPredicate
Creates a [FilterPredicate] from a boolean array.