@Test
  public void testFilterVarCharColumn() throws Exception {
    SearchArgument sarg =
        SearchArgumentFactory.newBuilder()
        .startAnd()
        .lessThan("a", PredicateLeaf.Type.STRING, new HiveVarchar("apple", 10).toString())
        .lessThanEquals("b", PredicateLeaf.Type.STRING, new HiveVarchar("pear", 10).toString())
        .equals("c", PredicateLeaf.Type.STRING, new HiveVarchar("orange", 10).toString())
        .nullSafeEquals("d", PredicateLeaf.Type.STRING, new HiveVarchar("pineapple", 9).toString())
        .in("e", PredicateLeaf.Type.STRING, new HiveVarchar("cherry", 10).toString(), new HiveVarchar("orange", 10).toString())
        .between("f", PredicateLeaf.Type.STRING, new HiveVarchar("apple", 10).toString(), new HiveVarchar("pear", 10).toString())
        .isNull("g", PredicateLeaf.Type.STRING)
        .end()
        .build();
    MessageType schema = MessageTypeParser.parseMessageType("message test {" +
        " required binary a; required binary b;"
        + " required binary c; required binary d;"
        + " required binary e; required binary f;"
        + " required binary g;}");

    Map<String, TypeInfo> columnTypes = new HashMap<>();
    columnTypes.put("a", TypeInfoFactory.getVarcharTypeInfo(10));
    columnTypes.put("b", TypeInfoFactory.getVarcharTypeInfo(10));
    columnTypes.put("c", TypeInfoFactory.getVarcharTypeInfo(10));
    columnTypes.put("d", TypeInfoFactory.getVarcharTypeInfo(10));
    columnTypes.put("e", TypeInfoFactory.getVarcharTypeInfo(10));
    columnTypes.put("f", TypeInfoFactory.getVarcharTypeInfo(10));
    columnTypes.put("g", TypeInfoFactory.getVarcharTypeInfo(10));

    FilterPredicate p = ParquetFilterPredicateConverter.toFilterPredicate(sarg, schema, columnTypes);
    String expected = "and(and(and(and(and(and("
        + "lt(a, Binary{\"apple\"}), "
        + "lteq(b, Binary{\"pear\"})), "
        + "eq(c, Binary{\"orange\"})), "
        + "eq(d, Binary{\"pineapple\"})), "
        + "or(eq(e, Binary{\"cherry\"}), eq(e, Binary{\"orange\"}))), "
        + "and(lteq(f, Binary{\"pear\"}), not(lt(f, Binary{\"apple\"})))), "
        + "eq(g, null))";
    assertEquals(expected, p.toString());
  }
Check the converted filter predicate is null if unsupported types are included
@throws Exception
ql/src/test/org/apache/hadoop/hive/ql/io/parquet/read/TestParquetFilterPredicate.java