DRILL-5796 was implemented removing the filter from the plan when some (or all) row groups of parquet table fully match the filter.
For the case when filter has some predicates which parquet filter predicate does not support, they can be omitted for some cases from the resulting filter predicate. When row groups fully match predicates which left in the filter, the whole filter is removed from the plan and the wrong result is returned.
Example of the query for reproducing this bug:
but single row should be returned:
Filter is removed from the plan, but it contains a predicate which wasn't applied:
Additionally, a filter is not removed from the plan when parquet table with single row group is queried:
Also, for the case when a table has multiple files, and filter matches all the table, it is not removed from the plan: