Package sql.visitors.jsql

Examples of sql.visitors.jsql.MaxSubExpressionsVisitor


  /*
   * For each expression from _globalProject (for now these are only from
   * SELECT clause), add the appropriate subexpressions to _exprList
   */
  private void processGlobalExprs(List<Expression> exprList) {
    final MaxSubExpressionsVisitor sev = new MaxSubExpressionsVisitor(_nt, _inputTupleSchema);
    sev.visit(_globalProject.getExprList());
    exprList.addAll(sev.getExprs());
  }
View Full Code Here


   */
  private void processGlobalOrs(List<Expression> exprList) {
    final List<OrExpression> orList = _globalProject.getOrExprs();
    if (orList != null)
      for (final OrExpression orExpr : _globalProject.getOrExprs()) {
        final MaxSubExpressionsVisitor sev = new MaxSubExpressionsVisitor(_nt,
            _inputTupleSchema);
        sev.visit(orExpr);
        if (!sev.isAllSubsMine(orExpr)) {
          // if all of them are available, SELECT operator is already
          // done
          // (either in this component because SELECT goes before
          // PROJECT
          // or in some of ancestor components)

          // we get all the subexpressions correlated to me
          final List<Expression> mineSubExprs = sev.getExprs();
          exprList.addAll(mineSubExprs);
        }
      }
  }
View Full Code Here

    // now we find joinCondition between ancestorNames and otherCompNames
    // joinExprs is a list of EqualsTo
    final List<Expression> joinExprs = _jte.getExpressions(ancestorNames, otherCompNames);

    final MaxSubExpressionsVisitor sev = new MaxSubExpressionsVisitor(_nt, _inputTupleSchema);
    sev.visit(joinExprs);
    // we get all the subexpressions correlated to me
    final List<Expression> mineSubExprs = sev.getExprs();
    exprList.addAll(mineSubExprs);

  }
View Full Code Here

TOP

Related Classes of sql.visitors.jsql.MaxSubExpressionsVisitor

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.