Package plan_runner.expressions

Examples of plan_runner.expressions.Multiplication


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

View Full Code Here


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

    ColumnReference suppKey = new ColumnReference(_sc, 2);
    //forth field in projection
    ValueExpression<Double> substract = new Subtraction(
        new ValueSpecification(_doubleConv, 1.0), new ColumnReference(_doubleConv, 6));
    //extendedPrice*(1-discount)
    ValueExpression<Double> product = new Multiplication(new ColumnReference(_doubleConv, 5),
        substract);
    ProjectOperator projectionLineitem = new ProjectOperator(orderKey, partKey, suppKey,
        product);

    DataSourceComponent relationLineitem = new DataSourceComponent("LINEITEM", dataPath
View Full Code Here

        colRefLineItem, colRefOrders);

    final ColumnReference colRefLineItemExtPrice = new ColumnReference(_doubleConv, 3);
    final ColumnReference colRefOrdersTotalPrice = new ColumnReference(_doubleConv, 1);
    final ValueSpecification val10 = new ValueSpecification(_doubleConv, 10.0);
    final Multiplication mult = new Multiplication(val10, colRefLineItemExtPrice);
    final ComparisonPredicate predL_O2 = new ComparisonPredicate(ComparisonPredicate.LESS_OP,
        mult, colRefOrdersTotalPrice);

    final AndPredicate predL_O = new AndPredicate(predL_O1, predL_O2);

    Component LINEITEMS_ORDERSjoin = ThetaJoinComponentFactory
        .createThetaJoinOperator(Theta_JoinType, relationLineitem, relationOrders,
            _queryPlan).setJoinPredicate(predL_O)
        .addOperator(new ProjectOperator(new int[] { 1, 2, 3, 4 }));

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

    final SelectOperator selectionPartSupp = new SelectOperator(new ComparisonPredicate(
        ComparisonPredicate.GREATER_OP, new ColumnReference(_intConv, 2),
        new ValueSpecification(_intConv, 9990)));

    final ColumnReference colRefSupplier = new ColumnReference(_intConv, 0);
    final ColumnReference colRefPartSupp = new ColumnReference(_intConv, 1);
    final ComparisonPredicate predS_P = new ComparisonPredicate(ComparisonPredicate.EQUAL_OP,
        colRefSupplier, colRefPartSupp);

    Component SUPPLIER_PARTSUPPjoin = ThetaJoinComponentFactory
        .createThetaJoinOperator(Theta_JoinType, relationSupplier, relationPartsupp,
            _queryPlan).setJoinPredicate(predS_P)
        .addOperator(new ProjectOperator(new int[] { 0, 1, 3 }))
        .addOperator(selectionPartSupp);

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

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

    final ColumnReference colRefL_OPartKey = new ColumnReference(_intConv, 0);
    final ColumnReference colRefS_PPartKey = new ColumnReference(_intConv, 1);
View Full Code Here

    final ColumnReference suppKey = new ColumnReference(_sc, 2);
    // forth field in projection
    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);
    final ProjectOperator projectionLineitem = new ProjectOperator(orderKey, partKey, suppKey,
        product);

    final DataSourceComponent relationLineitem = new DataSourceComponent("LINEITEM", dataPath
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.