#2790 query as a filter