Package plan_runner.expressions

Examples of plan_runner.expressions.Subtraction


        _queryPlan).setHashIndexes(hashRNSLCO).addOperator(projectionRNSLCO);

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

View Full Code Here


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

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

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

    new EquiJoinComponent(P_L_PS_O_Sjoin, relationNation, _queryPlan).addOperator(
View Full Code Here

        _queryPlan).setHashIndexes(hashRNSLCO).addOperator(projectionRNSLCO);

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

View Full Code Here

    // first field in projection
    final ValueExpression extractYear = new IntegerYearFromDate(new ColumnReference<Date>(
        _dateConv, 10));
    // 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
View Full Code Here

    // -------------------------------------------------------------------------------------
    // 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, 4));
    // extendedPrice*(1-discount)
    final ValueExpression<Double> product = new Multiplication(new ColumnReference(_doubleConv,
        3), substract);
    final AggregateOperator agg = new AggregateSumOperator(product, conf)
View Full Code Here

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

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

    // first field in projection
    final ValueExpression extractYear = new IntegerYearFromDate(new ColumnReference<Date>(
        _dateConv, 10));
    // 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
View Full Code Here

        .setJoinPredicate(R_N_S_L_C_O_comp);

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

View Full Code Here

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

    // 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, 1));
    // extendedPrice*(1-discount)
    final ValueExpression<Double> product = new Multiplication(new ColumnReference(_doubleConv,
        0), substract);
    final AggregateOperator agg = new AggregateSumOperator(product, conf);
View Full Code Here

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

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

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

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

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

    ColumnReference P_L_PS_O_S = new ColumnReference(_ic, 5);
View Full Code Here

TOP

Related Classes of plan_runner.expressions.Subtraction

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.