private static String makeJdoFilterForLike(String likePattern) {
      StringBuilder sb = new StringBuilder();
      for (int i = 0; i < likePattern.length(); i++) {
        // Make a special case for "\\_" and "\\%"
        char n = likePattern.charAt(i);
        if (n == '\\'
            && i + 1 < likePattern.length()
            && (likePattern.charAt(i + 1) == '_' || likePattern.charAt(i + 1) == '%')) {
          sb.append(likePattern.charAt(i + 1));
          i++;
          continue;
        }

        if (n == '_') {
          sb.append(".");
        } else if (n == '%') {
          sb.append(".*");
        } else {
          sb.append(likePattern.charAt(i));
        }
      }
      return sb.toString();
    }
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