Examples of EquiJoinComponent


Examples of plan_runner.components.EquiJoinComponent

        inputTupleSchema.add(new ColumnNameType("LINEITEM.ORDERKEY", _lc));
        //inputTupleSchema.add(new ColumnNameType("LINEITEM.SUPPKEY", _lc)); - join key
        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();
View Full Code Here

Examples of plan_runner.components.EquiJoinComponent

        //inputTupleSchema.add(new ColumnNameType("LINEITEM.SUPPKEY", _lc)); - join key
        inputTupleSchema.add(new ColumnNameType("LINEITEM.EXTENDEDPRICE", _dblConv));
        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();
View Full Code Here

Examples of plan_runner.components.EquiJoinComponent

        //inputTupleSchema.add(new ColumnNameType("LINEITEM.SUPPKEY", _lc)); - join key
        inputTupleSchema.add(new ColumnNameType("LINEITEM.EXTENDEDPRICE", _dblConv));
        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();
View Full Code Here

Examples of plan_runner.components.EquiJoinComponent

                "N1",
                dataPath + "nation" + extension,
                queryPlan);

        //-------------------------------------------------------------------------------------
        EquiJoinComponent S_Njoin = new EquiJoinComponent(
                relationSupplier,
                relationNation1,
                queryPlan);

       //-------------------------------------------------------------------------------------
        DataSourceComponent relationLineitem = new DataSourceComponent(
                "LINEITEM",
                dataPath + "lineitem" + extension,
                queryPlan);

        //-------------------------------------------------------------------------------------
        EquiJoinComponent L_S_Njoin = new EquiJoinComponent(
                relationLineitem,
                S_Njoin,
                queryPlan);
       
        return L_S_Njoin;
View Full Code Here

Examples of plan_runner.components.EquiJoinComponent

        + sourceFile + _extension, _queryPlan);
    return relation;
  }

  private EquiJoinComponent createAndAddEquiJoin(Component left, Component right) {
    final EquiJoinComponent joinComponent = new EquiJoinComponent(left, right, _queryPlan);

    return joinComponent;
  }
View Full Code Here

Examples of plan_runner.components.EquiJoinComponent

   * Join between two components List<Expression> is a set of join conditions
   * between two components.
   */
  @Override
  public EquiJoinComponent generateEquiJoin(Component left, Component right) {
    final EquiJoinComponent joinComponent = createAndAddEquiJoin(left, right);

    // compute join condition
    final List<Expression> joinCondition = ParserUtil.getJoinCondition(_pq, left, right);
    if (joinCondition == null)
      throw new RuntimeException("There is no join conditition between components "
View Full Code Here

Examples of plan_runner.components.EquiJoinComponent

    // -------------------------------------------------------------------------------------

    final AggregateCountOperator agg = new AggregateCountOperator(conf)
        .setGroupByColumns(Arrays.asList(1));

    new EquiJoinComponent(relationCustomer, relationOrders, _queryPlan).addOperator(agg);

    // -------------------------------------------------------------------------------------

  }
View Full Code Here

Examples of plan_runner.components.EquiJoinComponent

        + extension, _queryPlan).setHashIndexes(hashS);

    // -------------------------------------------------------------------------------------
    final List<Integer> hashIndexes = Arrays.asList(2);

    final EquiJoinComponent R_Sjoin = new EquiJoinComponent(relationR, relationS, _queryPlan)
        .setHashIndexes(hashIndexes);

    // -------------------------------------------------------------------------------------
    final List<Integer> hashT = Arrays.asList(0);

    final DataSourceComponent relationT = new DataSourceComponent("T", dataPath + "t"
        + extension, _queryPlan).setHashIndexes(hashT);

    // -------------------------------------------------------------------------------------
    final ValueExpression<Double> aggVe = new Multiplication(new ColumnReference(_dc, 0),
        new ColumnReference(_dc, 3));

    final AggregateSumOperator sp = new AggregateSumOperator(aggVe, conf);

    new EquiJoinComponent(R_Sjoin, relationT, _queryPlan).addOperator(
        new SelectOperator(new ComparisonPredicate(new ColumnReference(_ic, 1),
            new ValueSpecification(_ic, 10)))).addOperator(sp);

  }
View Full Code Here

Examples of plan_runner.components.EquiJoinComponent

    final DataSourceComponent relationOrders = new DataSourceComponent("ORDERS", dataPath
        + "orders" + extension, _queryPlan).setHashIndexes(hashOrders)
        .addOperator(selectionOrders).addOperator(projectionOrders);

    // -------------------------------------------------------------------------------------
    final EquiJoinComponent C_Ojoin = new EquiJoinComponent(relationCustomer, relationOrders,
        _queryPlan).setHashIndexes(Arrays.asList(3));
    // -------------------------------------------------------------------------------------
    final List<Integer> hashNation = Arrays.asList(0);

    final ProjectOperator projectionNation = new ProjectOperator(new int[] { 0, 1 });

    final DataSourceComponent relationNation = new DataSourceComponent("NATION", dataPath
        + "nation" + extension, _queryPlan).setHashIndexes(hashNation).addOperator(
        projectionNation);
    // -------------------------------------------------------------------------------------

    final EquiJoinComponent C_O_Njoin = new EquiJoinComponent(C_Ojoin, relationNation,
        _queryPlan).addOperator(new ProjectOperator(new int[] { 0, 1, 2, 4, 5, 6, 7, 8 }))
        .setHashIndexes(Arrays.asList(6));
    // -------------------------------------------------------------------------------------

    final List<Integer> hashLineitem = Arrays.asList(0);

    final SelectOperator selectionLineitem = new SelectOperator(new ComparisonPredicate(
        new ColumnReference(_sc, 8), new ValueSpecification(_sc, "R")));

    final ProjectOperator projectionLineitem = new ProjectOperator(new int[] { 0, 5, 6 });

    final DataSourceComponent relationLineitem = new DataSourceComponent("LINEITEM", dataPath
        + "lineitem" + extension, _queryPlan).setHashIndexes(hashLineitem)
        .addOperator(selectionLineitem).addOperator(projectionLineitem);

    // -------------------------------------------------------------------------------------
    // set up aggregation function on the StormComponent(Bolt) where join is
    // performed

    // 1 - discount
    final ValueExpression<Double> substract = new Subtraction(new ValueSpecification(
        _doubleConv, 1.0), new ColumnReference(_doubleConv, 8));
    // extendedPrice*(1-discount)
    final ValueExpression<Double> product = new Multiplication(new ColumnReference(_doubleConv,
        7), substract);
    final AggregateOperator agg = new AggregateSumOperator(product, conf)
        .setGroupByColumns(Arrays.asList(0, 1, 4, 6, 2, 3, 5));

    new EquiJoinComponent(C_O_Njoin, relationLineitem, _queryPlan).addOperator(
        new ProjectOperator(new int[] { 0, 1, 2, 3, 4, 5, 7, 8, 9 })).addOperator(agg);

  }
View Full Code Here

Examples of plan_runner.components.EquiJoinComponent

    final AggregationStorage secondJoinStorage = new AggregationStorage(
        new AggregateCountOperator(conf).setGroupByColumns(Arrays.asList(0)), _lc, conf,
        false);

    final List<Integer> hashIndexes = Arrays.asList(0);
    final EquiJoinComponent CUSTOMER_ORDERSjoin = new EquiJoinComponent(relationCustomer,
        relationOrders, _queryPlan).setFirstPreAggProj(projFirstOut)
        .setSecondPreAggProj(projSecondOut).setSecondPreAggStorage(secondJoinStorage)
        .setHashIndexes(hashIndexes);

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