Package plan_runner.expressions

Examples of plan_runner.expressions.Multiplication


    // set up aggregation function on a separate StormComponent(Bolt)

    final ValueExpression<Double> substract = new Subtraction(new ValueSpecification(
        _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


    // 1 - discount
    final ValueExpression<Double> substract1 = new Subtraction(new ValueSpecification(
        _doubleConv, 1.0), new ColumnReference(_doubleConv, 2));
    // extendedPrice*(1-discount)
    final ValueExpression<Double> product1 = new Multiplication(new ColumnReference(
        _doubleConv, 1), substract1);

    // ps_supplycost * l_quantity
    final ValueExpression<Double> product2 = new Multiplication(new ColumnReference(
        _doubleConv, 3), new ColumnReference(_doubleConv, 0));

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

View Full Code Here

    // set up aggregation function on a separate StormComponent(Bolt)

    final ValueExpression<Double> substract = new Subtraction(new ValueSpecification(
        _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

    // second field in projection
    // 1 - discount
    final ValueExpression<Double> substract = new Subtraction(new ValueSpecification(
        _doubleConv, 1.0), new ColumnReference(_doubleConv, 6));
    // extendedPrice*(1-discount)
    final ValueExpression<Double> product = new Multiplication(new ColumnReference(_doubleConv,
        5), substract);
    // third field in projection
    final ColumnReference supplierKey = new ColumnReference(_sc, 2);
    // forth field in projection
    final ColumnReference orderKey = new ColumnReference(_sc, 0);
View Full Code Here

    // 1 - discount
    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

    //1 - discount
    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));

View Full Code Here

    // second field in projection
    // 1 - discount
    final ValueExpression<Double> substract = new Subtraction(new ValueSpecification(
        _doubleConv, 1.0), new ColumnReference(_doubleConv, 6));
    // extendedPrice*(1-discount)
    final ValueExpression<Double> product = new Multiplication(new ColumnReference(_doubleConv,
        5), substract);
    // third field in projection
    final ColumnReference supplierKey = new ColumnReference(_sc, 2);
    // forth field in projection
    final ColumnReference orderKey = new ColumnReference(_sc, 0);
View Full Code Here

    // set up aggregation function on a separate StormComponent(Bolt)

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

    AggregateOperator aggOp = new AggregateSumOperator(product, conf).setGroupByColumns(Arrays
        .asList(0));
    OperatorComponent finalComponent = new OperatorComponent(R_N_S_L_C_Ojoin, "FINAL_RESULT",
View Full Code Here

    // performed
    // 1 - discount
    final ValueExpression<Double> substract = new Subtraction(new ValueSpecification(
        _doubleConv, 1.0), new ColumnReference(_doubleConv, 1));
    // extendedPrice*(1-discount)
    final ValueExpression<Double> product = new Multiplication(new ColumnReference(_doubleConv,
        0), substract);
    final AggregateOperator agg = new AggregateSumOperator(product, conf);

    // /Join predicate
    final ColumnReference colLineItems = new ColumnReference(_ic, 0);
    final ColumnReference colOrders = new ColumnReference(_ic, 0);
    final ComparisonPredicate pred1 = new ComparisonPredicate(ComparisonPredicate.EQUAL_OP,
        colLineItems, colOrders);

    final ValueSpecification value10 = new ValueSpecification(_doubleConv, 10.0);
    final ColumnReference colLineItemsInequality = new ColumnReference(_doubleConv, 1);
    final Multiplication mult = new Multiplication(value10, colLineItemsInequality);
    final ColumnReference colOrdersInequality = new ColumnReference(_doubleConv, 1);
    final ComparisonPredicate pred2 = new ComparisonPredicate(ComparisonPredicate.LESS_OP,
        mult, colOrdersInequality);

    final AndPredicate overallPred = new AndPredicate(pred1, pred2);
View Full Code Here

    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(
View Full Code Here

TOP

Related Classes of plan_runner.expressions.Multiplication

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.