@Override
    public FilterPredicate buildPredict(Operator op, Object constant,
                                        String columnName, TypeInfo columnType) throws Exception{
      // For CHAR types, the trailing spaces should be removed before adding the
      // value to the predicate. This change is needed because for CHAR types,
      // Hive passes a padded value to the predicate, but since the value
      // is stored in Parquet without padding, no result would be returned.
      // For more details about this issue, please refer to HIVE-21407.
      String value = null;
      if (constant != null) {
        value = (String) constant;
        if (columnType != null && columnType.toString().startsWith(serdeConstants.CHAR_TYPE_NAME)) {
          value = removeTrailingSpaces(value);
        }
      }
      switch (op) {
        case LESS_THAN:
          return lt(binaryColumn(columnName), Binary.fromString(value));
        case IS_NULL:
        case EQUALS:
        case NULL_SAFE_EQUALS:
          return eq(binaryColumn(columnName),
            (constant == null) ? null : Binary.fromString(value));
        case LESS_THAN_EQUALS:
          return ltEq(binaryColumn(columnName), Binary.fromString(value));
        default:
          // should never be executed
          throw new RuntimeException("Unknown PredicateLeaf Operator type: " + op);
      }
    }
@param op         consists of EQUALS, NULL_SAFE_EQUALS, LESS_THAN, LESS_THAN_EQUALS, IS_NULL
@param literal
@param columnName
@param columnType
@return
ql/src/java/org/apache/hadoop/hive/ql/io/parquet/LeafFilterFactory.java