private Set getBucketsForFilter(Set filter) {
      Set bucketids = new HashSet();
      for (Object key : filter) {
        int intKey = (Integer) key;
        bucketids.add(intKey % numOfBuckets);
      }
      return bucketids;
    }
Test on PR on one server only using filter.
geode-core/src/distributedTest/java/org/apache/geode/cache/query/dunit/QueryUsingFunctionContextDUnitTest.java