Package sql.visitors.squall

Examples of sql.visitors.squall.NameSelectItemsVisitor


        inputTupleSchema.add(new ColumnNameType("LINEITEM.EXTENDEDPRICE * (1.0 - LINEITEM.DISCOUNT)", _dblConv));
        inputTupleSchema.add(new ColumnNameType("LINEITEM.ORDERKEY", _lc)); // not used
       
        DataSourceComponent source = new DataSourceComponent("TestFullExprs", "", new QueryPlan());
       
        NameSelectItemsVisitor selectVisitor = new NameSelectItemsVisitor(new TupleSchema(inputTupleSchema), _map, source);
        for(SelectItem elem: _pq.getSelectItems()){
            elem.accept(selectVisitor);
        }
        List<AggregateOperator> aggOps = selectVisitor.getAggOps();
        List<ValueExpression> groupByVEs = selectVisitor.getGroupByVEs();
       
        //expected
        AggregateOperator agg = new AggregateSumOperator(
                new ColumnReference(_dblConv, 3, "LINEITEM.EXTENDEDPRICE * (1.0 - LINEITEM.DISCOUNT)"),
                _map);
View Full Code Here


    // operators
    addSelectOperator(source);
    addProjectOperator(source);

    // For single-dataSource plans (such as TPCH6)
    NameSelectItemsVisitor nsiv = null;
    if (ParserUtil.isFinalComponent(source, _pq)) {
      // final component in terms of joins
      nsiv = getFinalSelectVisitor(source);
      attachSelectClauseOnLastJoin(source, nsiv);
    }
View Full Code Here

    addProjectOperator(joinComponent);
    // assume no operators between projection and final aggregation
    // final aggregation is able to do projection in GroupByProjection
    // }

    NameSelectItemsVisitor nsiv = null;
    if (ParserUtil.isFinalComponent(joinComponent, _pq)) {
      // final component in terms of joins
      nsiv = getFinalSelectVisitor(joinComponent);
      attachSelectClauseOnLastJoin(joinComponent, nsiv);
    }
View Full Code Here

  /*************************************************************************************
   * SELECT clause - Final aggregation
   *************************************************************************************/
  private NameSelectItemsVisitor getFinalSelectVisitor(Component lastComponent) {
    final TupleSchema tupleSchema = _compCost.get(lastComponent.getName()).getSchema();
    final NameSelectItemsVisitor selectVisitor = new NameSelectItemsVisitor(tupleSchema, _map,
        lastComponent);
    for (final SelectItem elem : _pq.getSelectItems())
      elem.accept(selectVisitor);
    return selectVisitor;
  }
View Full Code Here

TOP

Related Classes of sql.visitors.squall.NameSelectItemsVisitor

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.