private void generateJDOFilterOverPartitions(Configuration conf,
                                                 Map<String, Object> params, FilterBuilder filterBuilder, List<FieldSchema> partitionKeys) throws MetaException {
      int partitionColumnCount = partitionKeys.size();
      int partitionColumnIndex = LeafNode.getPartColIndexForFilter(keyName, partitionKeys, filterBuilder);
      if (filterBuilder.hasError()) return;

      boolean canPushDownIntegral =
          MetastoreConf.getBoolVar(conf, MetastoreConf.ConfVars.INTEGER_JDO_PUSHDOWN);
      String valueAsString = getJdoFilterPushdownParam(
              partitionColumnIndex, filterBuilder, canPushDownIntegral, partitionKeys);
      if (filterBuilder.hasError()) return;

      String paramName = PARAM_PREFIX + params.size();
      if (operator == Operator.LIKE) {
        params.put(paramName, makeJdoFilterForLike(valueAsString));
      } else {
        params.put(paramName, valueAsString);
      }

      boolean isOpEquals = Operator.isEqualOperator(operator);
      if (isOpEquals || Operator.isNotEqualOperator(operator)) {
        String partitionKey = partitionKeys.get(partitionColumnIndex).getName();
        makeFilterForEquals(partitionKey, valueAsString, paramName, params,
            partitionColumnIndex, partitionColumnCount, isOpEquals, filterBuilder);
        return;
      }
      //get the value for a partition key form MPartition.values (PARTITION_KEY_VALUES)
      String valString = "values.get(" + partitionColumnIndex + ")";

      if (operator == Operator.LIKE) {
        if (isReverseOrder) {
          // For LIKE, the value should be on the RHS.
          filterBuilder.setError(
              "Value should be on the RHS for LIKE operator : Key <" + keyName + ">");
        }
        // TODO: in all likelihood, this won't actually work. Keep it for backward compat.
        filterBuilder.append(" " + valString + "." + operator.getJdoOp() + "(" + paramName + ") ");
      } else {
        filterBuilder.append(isReverseOrder
            ? paramName + " " + operator.getJdoOp() + " " + valString
            : " " + valString + " " + operator.getJdoOp() + " " + paramName);
      }
    }
Generates a general filter.  Given a map of <key, value>,
generates a statement of the form:
key1 operator value2 (&& | || ) key2 operator value2 ...

Currently supported types for value are String and Long.
The LIKE operator for Longs is unsupported.
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/parser/ExpressionTree.java