@Test
  public void testFilterStringColumnWithWhiteSpaces() 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())
        .end()
        .build();
    MessageType schema = MessageTypeParser.parseMessageType("message test {" +
        " required binary a; required binary b;"
        + " required binary c;}");
    Map<String, TypeInfo> columnTypes = new HashMap<>();
    columnTypes.put("a", TypeInfoFactory.getPrimitiveTypeInfo("string"));
    columnTypes.put("b", TypeInfoFactory.getPrimitiveTypeInfo("string"));
    columnTypes.put("c", TypeInfoFactory.getPrimitiveTypeInfo("string"));

    FilterPredicate p = ParquetFilterPredicateConverter.toFilterPredicate(sarg, schema, columnTypes);
    String expected = "and(and("
        + "lt(a, Binary{\" apple  \"}), "
        + "lteq(b, Binary{\" pear\"})), "
        + "eq(c, Binary{\"orange \"}))";
    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