Examples of TupleSchema


Examples of sql.util.TupleSchema

  /*************************************************************************************
   * Project operator
   *************************************************************************************/
  private void addProjectOperator(Component component) {
    final String compName = component.getName();
    final TupleSchema inputTupleSchema = _compCost.get(compName).getSchema();
    final ProjSchemaCreator psc = new ProjSchemaCreator(_globalCollect, inputTupleSchema,
        component, _pq, _schema);
    psc.create();

    final TupleSchema outputTupleSchema = psc.getOutputSchema();

    if (!ParserUtil.isSameSchema(inputTupleSchema, outputTupleSchema)) {
      // no need to add projectOperator unless it changes something
      attachProjectOperator(component, psc.getProjectOperator());
      processProjectCost(component, outputTupleSchema);
View Full Code Here

Examples of sql.util.TupleSchema

    // create schema and selectivity wrt leftParent
    final String compName = joinComponent.getName();
    final CostParams costParams = new CostParams();

    // *********set schema
    final TupleSchema schema = ParserUtil.joinSchema(joinComponent.getParents(), _compCost);
    costParams.setSchema(schema);

    _compCost.put(compName, costParams);
  }
View Full Code Here

Examples of sql.util.TupleSchema

  private void createCompCost(OperatorComponent opComp) {
    final String compName = opComp.getName();
    final CostParams costParams = new CostParams();

    // *********set schema
    final TupleSchema schema = _compCost.get(opComp.getParents()[0].getName()).getSchema();
    costParams.setSchema(schema);

    _compCost.put(compName, costParams);
  }
View Full Code Here

Examples of sql.util.TupleSchema

  /*************************************************************************************
   * 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

Examples of sql.util.TupleSchema

   * be built of inputTupleSchema (constants included)
   */
  private void processWhereForComponent(Component affectedComponent, Expression whereCompExpr) {
    if (whereCompExpr != null) {
      // first get the current schema of the component
      final TupleSchema tupleSchema = _compCost.get(affectedComponent.getName()).getSchema();
      final NameWhereVisitor whereVisitor = new NameWhereVisitor(tupleSchema,
          affectedComponent);
      whereCompExpr.accept(whereVisitor);
      attachWhereClause(affectedComponent, whereVisitor.getSelectOperator());
    }
View Full Code Here

Examples of sql.util.TupleSchema

        inputTupleSchema.add(new ColumnNameType("LINEITEM.EXTENDEDPRICE * (1.0 - LINEITEM.DISCOUNT)", _dblConv));
        inputTupleSchema.add(new ColumnNameType("EXTRACT_YEAR(LINEITEM.SHIPDATE)", _ic));
       
        EquiJoinComponent L_S_Njoin = createTPCH7_LSNSubplan();

        ProjSchemaCreator psc = new ProjSchemaCreator(_globalProject, new TupleSchema(inputTupleSchema), L_S_Njoin, _parsedQuery, _schema);
        psc.create();
       
        List<ColumnNameType> outputTupleSchema = psc.getOutputSchema().getSchema();
        ProjectOperator projectOperator = psc.getProjectOperator();
        
View Full Code Here

Examples of sql.util.TupleSchema

        inputTupleSchema.add(new ColumnNameType("1.0 - LINEITEM.DISCOUNT", _dblConv));
        inputTupleSchema.add(new ColumnNameType("LINEITEM.SHIPDATE", _ic));
       
        EquiJoinComponent L_S_Njoin = createTPCH7_LSNSubplan();

        ProjSchemaCreator psc = new ProjSchemaCreator(_globalProject, new TupleSchema(inputTupleSchema), L_S_Njoin, _parsedQuery, _schema);
        psc.create();
       
        List<ColumnNameType> outputTupleSchema = psc.getOutputSchema().getSchema();
        ProjectOperator projectOperator = psc.getProjectOperator();
        
View Full Code Here

Examples of sql.util.TupleSchema

        inputTupleSchema.add(new ColumnNameType("LINEITEM.DISCOUNT", _dblConv));
        inputTupleSchema.add(new ColumnNameType("LINEITEM.SHIPDATE", _ic));
       
        EquiJoinComponent L_S_Njoin = createTPCH7_LSNSubplan();

        ProjSchemaCreator psc = new ProjSchemaCreator(_globalProject, new TupleSchema(inputTupleSchema), L_S_Njoin, _parsedQuery, _schema);
        psc.create();
       
        List<ColumnNameType> outputTupleSchema = psc.getOutputSchema().getSchema();
        ProjectOperator projectOperator = psc.getProjectOperator();
        
View Full Code Here

Examples of sql.util.TupleSchema

      final ColumnNameType cnt = new ColumnNameType(exprStr, tc);
      cnts.add(cnt);
    }

    // copying all the synonims from inputTupleSchema
    final TupleSchema result = new TupleSchema(cnts);
    final Map<String, String> inputSynonims = _inputTupleSchema.getSynonims();
    if (inputSynonims != null)
      result.setSynonims(inputSynonims);

    return result;
  }
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.