Examples of AggregateSumOperator


Examples of plan_runner.operators.AggregateSumOperator

      _agg.setDistinct(distinct);
    }
  }

  protected void createSum(ValueExpression ve, boolean isDistinct) {
    _agg = new AggregateSumOperator(ve, _map);

    // DISTINCT and agg are stored on the same component.
    if (isDistinct) {
      final DistinctOperator distinct = new DistinctOperator(_map, ve);
      _agg.setDistinct(distinct);
View Full Code Here

Examples of plan_runner.operators.AggregateSumOperator

      cr = new ColumnReference(wrapper, 0);

    if (lastAgg instanceof AggregateAvgOperator)
      overallAgg = new AggregateAvgOperator(cr, map);
    else
      overallAgg = new AggregateSumOperator(cr, map);

    if (lastAgg.hasGroupBy())
      overallAgg.setGroupByColumns(Arrays.asList(0));

    return overallAgg;
View Full Code Here

Examples of plan_runner.operators.AggregateSumOperator

        }
        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);
        List<AggregateOperator> expAggOps = Arrays.asList(agg);
        List<ColumnReference> expGroupByVEs = Arrays.asList(new ColumnReference(_sc, 0, "N1.NAME"),
                                                        new ColumnReference(_sc, 1, "N2.NAME"),
View Full Code Here

Examples of plan_runner.operators.AggregateSumOperator

    final EquiJoinComponent CUSTOMER_ORDERSjoin = new EquiJoinComponent(relationCustomer,
        relationOrders, _queryPlan).addOperator(postAgg).setHashIndexes(hashIndexes)
        .setBatchOutputMillis(1000);

    // -------------------------------------------------------------------------------------
    final AggregateSumOperator agg = new AggregateSumOperator(new ColumnReference(_ic, 1), conf)
        .setGroupByColumns(Arrays.asList(0));

    new OperatorComponent(CUSTOMER_ORDERSjoin, "COUNTAGG", _queryPlan).addOperator(agg)
        .setFullHashList(
            Arrays.asList("FURNITURE", "BUILDING", "MACHINERY", "HOUSEHOLD",
View Full Code Here

Examples of plan_runner.operators.AggregateSumOperator

        _doubleConv, 3), new ColumnReference(_doubleConv, 0));

    // all together
    final ValueExpression<Double> substract2 = new Subtraction(product1, product2);

    final AggregateOperator agg = new AggregateSumOperator(substract2, conf)
        .setGroupByColumns(Arrays.asList(5, 4));

    new EquiJoinComponent(P_L_PS_O_Sjoin, relationNation, _queryPlan).addOperator(
        new ProjectOperator(new int[] { 0, 1, 2, 3, 4, 6 })).addOperator(agg);
View Full Code Here

Examples of plan_runner.operators.AggregateSumOperator

        _doubleConv, 1.0), new ColumnReference(_doubleConv, 2));
    // extendedPrice*(1-discount)
    final ValueExpression<Double> product = new Multiplication(new ColumnReference(_doubleConv,
        1), substract);

    final AggregateOperator aggOp = new AggregateSumOperator(product, conf)
        .setGroupByColumns(Arrays.asList(0));
    new OperatorComponent(R_N_S_L_C_Ojoin, "FINAL_RESULT", _queryPlan).addOperator(aggOp);

    // -------------------------------------------------------------------------------------
  }
View Full Code Here

Examples of plan_runner.operators.AggregateSumOperator

            new ValueSpecification(_sc, _secondCountryName))), new AndPredicate(
        new ComparisonPredicate(new ColumnReference(_sc, 0), new ValueSpecification(_sc,
            _secondCountryName)), new ComparisonPredicate(new ColumnReference(_sc, 2),
            new ValueSpecification(_sc, _firstCountryName)))));

    final AggregateOperator agg = new AggregateSumOperator(new ColumnReference(_doubleConv, 4),
        conf).setGroupByColumns(Arrays.asList(2, 0, 3));

    new EquiJoinComponent(N_C_Ojoin, L_S_Njoin, _queryPlan).addOperator(so).addOperator(agg);

  }
View Full Code Here

Examples of plan_runner.operators.AggregateSumOperator

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

    new EquiJoinComponent(C_Ojoin, relationLineitem, _queryPlan).addOperator(agg);

    // -------------------------------------------------------------------------------------
View Full Code Here

Examples of plan_runner.operators.AggregateSumOperator

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

    final AggregateOperator agg = new AggregateSumOperator(new ColumnReference(_doubleConv, 0),
        conf);
    // Empty parameters = Cartesian Product

    Component lastJoiner = ThetaJoinComponentFactory
        .createThetaJoinOperator(Theta_JoinType, relationSupplier, relationNation,
View Full Code Here

Examples of plan_runner.operators.AggregateSumOperator

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

    ColumnReference colC_O_N = new ColumnReference(_ic, 6);
    ColumnReference colL = new ColumnReference(_ic, 0);
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.