public static boolean canDrop(
      FilterPredicate pred, List<ColumnChunkMetaData> columns, DictionaryPageReadStore dictionaries) {
    Objects.requireNonNull(pred, "pred cannnot be null");
    Objects.requireNonNull(columns, "columns cannnot be null");
    return pred.accept(new DictionaryFilter(columns, dictionaries));
  }
@Test
  public void testInBinary() throws Exception {
    BinaryColumn b = binaryColumn("binary_field");

    Set<Binary> set1 = new HashSet<>();
    set1.add(Binary.fromString("F"));
    set1.add(Binary.fromString("C"));
    set1.add(Binary.fromString("h"));
    set1.add(Binary.fromString("E"));
    FilterPredicate predIn1 = in(b, set1);
    FilterPredicate predNotIn1 = notIn(b, set1);
    assertFalse("Should not drop block", canDrop(predIn1, ccmd, dictionaries));
    assertFalse("Should not drop block", canDrop(predNotIn1, ccmd, dictionaries));

    Set<Binary> set2 = new HashSet<>();
    for (int i = 0; i < 26; i++) {
      set2.add(Binary.fromString(Character.toString((char) (i + 97))));
    }
    set2.add(Binary.fromString("A"));
    FilterPredicate predIn2 = in(b, set2);
    FilterPredicate predNotIn2 = notIn(b, set2);
    assertFalse("Should not drop block", canDrop(predIn2, ccmd, dictionaries));
    assertTrue("Should not drop block", canDrop(predNotIn2, ccmd, dictionaries));

    Set<Binary> set3 = new HashSet<>();
    set3.add(Binary.fromString("F"));
    set3.add(Binary.fromString("C"));
    set3.add(Binary.fromString("A"));
    set3.add(Binary.fromString("E"));
    FilterPredicate predIn3 = in(b, set3);
    FilterPredicate predNotIn3 = notIn(b, set3);
    assertTrue("Should drop block", canDrop(predIn3, ccmd, dictionaries));
    assertFalse("Should not drop block", canDrop(predNotIn3, ccmd, dictionaries));

    Set<Binary> set4 = new HashSet<>();
    set4.add(null);
    FilterPredicate predIn4 = in(b, set4);
    FilterPredicate predNotIn4 = notIn(b, set4);
    assertFalse("Should not drop block for null", canDrop(predIn4, ccmd, dictionaries));
    assertFalse("Should not drop block for null", canDrop(predNotIn4, ccmd, dictionaries));

    BinaryColumn sharpAndNull = binaryColumn("optional_single_value_field");

    // Test the case that all non-null values are in the set but the column may have nulls and the set has no nulls.
    Set<Binary> set5 = new HashSet<>();
    set5.add(Binary.fromString("sharp"));
    FilterPredicate predNotIn5 = notIn(sharpAndNull, set5);
    FilterPredicate predIn5 = in(sharpAndNull, set5);
    assertFalse("Should not drop block", canDrop(predNotIn5, ccmd, dictionaries));
    assertFalse("Should not drop block", canDrop(predIn5, ccmd, dictionaries));
  }