Examples of ExpressionTree


Examples of org.apache.hadoop.hive.metastore.parser.ExpressionTree

    // TODO: this is all pretty ugly. The only reason we need all these transformations
    //       is to maintain support for simple filters for HCat users that query metastore.
    //       If forcing everyone to use thick client is out of the question, maybe we could
    //       parse the filter into standard hive expressions and not all this separate tree
    //       Filter.g stuff. That way this method and ...ByFilter would just be merged.
    final ExpressionTree exprTree = makeExpressionTree(filter);

    final AtomicBoolean hasUnknownPartitions = new AtomicBoolean(false);
    result.addAll(new GetListHelper<Partition>(dbName, tblName, allowSql, allowJdo) {
      @Override
      protected List<Partition> getSqlResult(GetHelper<List<Partition>> ctx) throws MetaException {
View Full Code Here

Examples of org.apache.hadoop.hive.metastore.parser.ExpressionTree

    // TODO: ExprNodeDesc is an expression tree, we could just use that and be rid of Filter.g.
    if (filter == null || filter.isEmpty()) {
      return ExpressionTree.EMPTY_TREE;
    }
    LOG.debug("Filter specified is " + filter);
    ExpressionTree tree = null;
    try {
      tree = getFilterParser(filter).tree;
    } catch (MetaException ex) {
      LOG.info("Unable to make the expression tree from expression string ["
          + filter + "]" + ex.getMessage()); // Don't log the stack, this is normal.
    }
    if (tree == null) {
      return null;
    }
    // We suspect that LIKE pushdown into JDO is invalid; see HIVE-5134. Check for like here.
    LikeChecker lc = new LikeChecker();
    tree.accept(lc);
    return lc.hasLike() ? null : tree;
  }
View Full Code Here

Examples of org.apache.hadoop.hive.metastore.parser.ExpressionTree

  }

  protected List<Partition> getPartitionsByFilterInternal(String dbName, String tblName,
      String filter, final short maxParts, boolean allowSql, boolean allowJdo)
      throws MetaException, NoSuchObjectException {
    final ExpressionTree tree = (filter != null && !filter.isEmpty())
        ? getFilterParser(filter).tree : ExpressionTree.EMPTY_TREE;

    return new GetListHelper<Partition>(dbName, tblName, allowSql, allowJdo) {
      @Override
      protected List<Partition> getSqlResult(GetHelper<List<Partition>> ctx) throws MetaException {
View Full Code Here

Examples of org.apache.hadoop.hive.metastore.parser.ExpressionTree

   * @param params Parameters for the filter. Some parameters may be added here.
   * @return Resulting filter.
   */
  private String makeQueryFilterString(String dbName, MTable mtable, String filter,
      Map<String, Object> params) throws MetaException {
    ExpressionTree tree = (filter != null && !filter.isEmpty())
        ? getFilterParser(filter).tree : ExpressionTree.EMPTY_TREE;
    return makeQueryFilterString(dbName, convertToTable(mtable), tree, params, true);
  }
View Full Code Here

Examples of org.apache.hadoop.hive.ql.io.sarg.SearchArgumentImpl.ExpressionTree

* comment above the blob.
*/
public class TestSearchArgumentImpl {

  private ExpressionTree not(ExpressionTree arg) {
    return new ExpressionTree(ExpressionTree.Operator.NOT, arg);
  }
View Full Code Here

Examples of org.apache.hadoop.hive.ql.io.sarg.SearchArgumentImpl.ExpressionTree

  private ExpressionTree not(ExpressionTree arg) {
    return new ExpressionTree(ExpressionTree.Operator.NOT, arg);
  }

  private ExpressionTree and(ExpressionTree... arg) {
    return new ExpressionTree(ExpressionTree.Operator.AND, arg);
  }
View Full Code Here

Examples of org.apache.hadoop.hive.ql.io.sarg.SearchArgumentImpl.ExpressionTree

  private ExpressionTree and(ExpressionTree... arg) {
    return new ExpressionTree(ExpressionTree.Operator.AND, arg);
  }

  private ExpressionTree or(ExpressionTree... arg) {
    return new ExpressionTree(ExpressionTree.Operator.OR, arg);
  }
View Full Code Here

Examples of org.apache.hadoop.hive.ql.io.sarg.SearchArgumentImpl.ExpressionTree

  private ExpressionTree or(ExpressionTree... arg) {
    return new ExpressionTree(ExpressionTree.Operator.OR, arg);
  }

  private ExpressionTree leaf(int leaf) {
    return new ExpressionTree(leaf);
  }
View Full Code Here

Examples of org.apache.hadoop.hive.ql.io.sarg.SearchArgumentImpl.ExpressionTree

  private ExpressionTree leaf(int leaf) {
    return new ExpressionTree(leaf);
  }

  private ExpressionTree constant(TruthValue val) {
    return new ExpressionTree(val);
  }
View Full Code Here

Examples of org.apache.hadoop.hive.ql.io.sarg.SearchArgumentImpl.ExpressionTree

* comment above the blob.
*/
public class TestSearchArgumentImpl {

  private ExpressionTree not(ExpressionTree arg) {
    return new ExpressionTree(ExpressionTree.Operator.NOT, arg);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.