Package plan_runner.operators

Examples of plan_runner.operators.AggregateOperator


          try {
            _semAgg.acquire();
          } catch (final InterruptedException ex) {
          }
          // sending
          final AggregateOperator agg = (AggregateOperator) lastOperator;
          final List<String> tuples = agg.getContent();
          for (final String tuple : tuples)
            tupleSend(MyUtilities.stringToTuple(tuple, getConf()), null, 0);
          // clearing
          agg.clearStorage();
          _semAgg.release();
        }
      }
  }
View Full Code Here


        }
        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

        _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 AggregateAvgOperator(product, conf)
        .setGroupByColumns(Arrays.asList(0));
    new OperatorComponent(R_N_S_L_C_Ojoin, "FINAL_RESULT", _queryPlan).addOperator(aggOp);

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

        _queryPlan).setHashIndexes(Arrays.asList(1));

    // -------------------------------------------------------------------------------------
    // set up aggregation function on a separate StormComponent(Bolt)
    final DistinctOperator distinctOp = new DistinctOperator(conf, new int[] { 0 });
    final AggregateOperator aggOp = new AggregateCountOperator(conf).setGroupByColumns(
        Arrays.asList(1)).setDistinct(distinctOp);
    new OperatorComponent(O_Ljoin, "FINAL_RESULT", _queryPlan).addOperator(aggOp);

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

        _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

        _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

        .createThetaJoinOperator(Theta_JoinType, relationOrders, relationLineitem,
            _queryPlan).setHashIndexes(Arrays.asList(1)).setJoinPredicate(O_L_comp);

    //-------------------------------------------------------------------------------------
    // set up aggregation function on a separate StormComponent(Bolt)
    AggregateOperator aggOp = new AggregateCountOperator(conf).setGroupByColumns(Arrays
        .asList(1));
    OperatorComponent finalComponent = new OperatorComponent(O_Ljoin, "FINAL_RESULT",
        _queryPlan).addOperator(aggOp);

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

            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

    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

    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

TOP

Related Classes of plan_runner.operators.AggregateOperator

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.