get_filter_logical function

Compute a Filter Predicate