code: public static Query parseQuery(String expr) {
      try {
        return (Query) parse(expr);
      } catch (ClassCastException e) {
        throw new IllegalArgumentException("invalid query expression: " + expr, e);
      }
    }
docs: Parse an <a href="https://github.com/Netflix/atlas/wiki/Reference-query">Atlas query
  expression</a>.