Package org.eigenbase.relopt.RelOptUtil

Examples of org.eigenbase.relopt.RelOptUtil.InputReferencedVisitor


  }

  private Double getMaxNDV(RexCall call) {
    double tmpNDV;
    double maxNDV = 1.0;
    InputReferencedVisitor irv;

    for (RexNode op : call.getOperands()) {
      if (op instanceof RexInputRef) {
        tmpNDV = HiveRelMdDistinctRowCount.getDistinctRowCount(this.childRel,
            ((RexInputRef) op).getIndex());
        if (tmpNDV > maxNDV)
          maxNDV = tmpNDV;
      } else {
        irv = new InputReferencedVisitor();
        irv.apply(op);
        for (Integer childProjIndx : irv.inputPosReferenced) {
          tmpNDV = HiveRelMdDistinctRowCount.getDistinctRowCount(this.childRel, childProjIndx);
          if (tmpNDV > maxNDV)
            maxNDV = tmpNDV;
        }
View Full Code Here


      // 1. Split leaf join predicate to expressions from left, right
      RelOptUtil.splitJoinCondition(j.getSystemFieldList(), j.getLeft(), j.getRight(), pe,
          joinKeyExprsFromLeft, joinKeyExprsFromRight, filterNulls, null);

      // 2. For left expressions, collect child projection indexes used
      InputReferencedVisitor irvLeft = new InputReferencedVisitor();
      irvLeft.apply(joinKeyExprsFromLeft);
      projsFromLeftPartOfJoinKeysInChildSchema.addAll(irvLeft.inputPosReferenced);

      // 3. For right expressions, collect child projection indexes used
      InputReferencedVisitor irvRight = new InputReferencedVisitor();
      irvRight.apply(joinKeyExprsFromRight);
      projsFromRightPartOfJoinKeysInChildSchema.addAll(irvRight.inputPosReferenced);

      // 3. Translate projection indexes from right to join schema, by adding
      // offset.
      for (Integer indx : projsFromRightPartOfJoinKeysInChildSchema) {
View Full Code Here

TOP

Related Classes of org.eigenbase.relopt.RelOptUtil.InputReferencedVisitor

Copyright © 2018 www.massapicom. 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.