Package org.apache.pig.backend.hadoop.executionengine.physicalLayer.expressionOperators

Examples of org.apache.pig.backend.hadoop.executionengine.physicalLayer.expressionOperators.BinaryExpressionOperator


                UnaryComparisonOperator orig = (UnaryComparisonOperator)op;
                UnaryComparisonOperator cloneOp = (UnaryComparisonOperator)matches.get(op);
                cloneOp.setExpr((ExpressionOperator)matches.get(orig.getExpr()));
                cloneOp.setOperandType(orig.getOperandType());
            } else if (op instanceof BinaryExpressionOperator) {
                BinaryExpressionOperator orig = (BinaryExpressionOperator)op;
                BinaryExpressionOperator cloneOp = (BinaryExpressionOperator)matches.get(op);
                cloneOp.setRhs((ExpressionOperator)matches.get(orig.getRhs()));
                cloneOp.setLhs((ExpressionOperator)matches.get(orig.getLhs()));
            } else if (op instanceof POBinCond) {
                POBinCond orig = (POBinCond)op;
                POBinCond cloneOp = (POBinCond)matches.get(op);
                cloneOp.setRhs((ExpressionOperator)matches.get(orig.getRhs()));
                cloneOp.setLhs((ExpressionOperator)matches.get(orig.getLhs()));
                cloneOp.setCond((ExpressionOperator)matches.get(orig.getCond()));
            }
        }

        return clone;
    }
View Full Code Here


    }

    @Override
    protected void visit(LOAdd op) throws VisitorException {
        String scope = op.getOperatorKey().scope;
        BinaryExpressionOperator exprOp = new Add(new OperatorKey(scope,
                nodeGen.getNextNodeId(scope)), op.getRequestedParallelism());
        exprOp.setAlias(op.getAlias());
        exprOp.setResultType(op.getType());
        exprOp.setLhs((ExpressionOperator) logToPhyMap.get(op.getLhsOperand()));
        exprOp.setRhs((ExpressionOperator) logToPhyMap.get(op.getRhsOperand()));
        LogicalPlan lp = op.getPlan();

        currentPlan.add(exprOp);
        logToPhyMap.put(op, exprOp);
View Full Code Here

    }

    @Override
    protected void visit(LOSubtract op) throws VisitorException {
        String scope = op.getOperatorKey().scope;
        BinaryExpressionOperator exprOp = new Subtract(new OperatorKey(scope,
                nodeGen.getNextNodeId(scope)), op.getRequestedParallelism());
        exprOp.setAlias(op.getAlias());
        exprOp.setResultType(op.getType());
        exprOp.setLhs((ExpressionOperator) logToPhyMap.get(op.getLhsOperand()));
        exprOp.setRhs((ExpressionOperator) logToPhyMap.get(op.getRhsOperand()));
        LogicalPlan lp = op.getPlan();

        currentPlan.add(exprOp);
        logToPhyMap.put(op, exprOp);
View Full Code Here

    }

    @Override
    protected void visit(LOMultiply op) throws VisitorException {
        String scope = op.getOperatorKey().scope;
        BinaryExpressionOperator exprOp = new Multiply(new OperatorKey(scope,
                nodeGen.getNextNodeId(scope)), op.getRequestedParallelism());
        exprOp.setAlias(op.getAlias());
        exprOp.setResultType(op.getType());
        exprOp.setLhs((ExpressionOperator) logToPhyMap.get(op.getLhsOperand()));
        exprOp.setRhs((ExpressionOperator) logToPhyMap.get(op.getRhsOperand()));
        LogicalPlan lp = op.getPlan();

        currentPlan.add(exprOp);
        logToPhyMap.put(op, exprOp);
View Full Code Here

    }

    @Override
    protected void visit(LODivide op) throws VisitorException {
        String scope = op.getOperatorKey().scope;
        BinaryExpressionOperator exprOp = new Divide(new OperatorKey(scope,
                nodeGen.getNextNodeId(scope)), op.getRequestedParallelism());
        exprOp.setAlias(op.getAlias());
        exprOp.setResultType(op.getType());
        exprOp.setLhs((ExpressionOperator) logToPhyMap.get(op.getLhsOperand()));
        exprOp.setRhs((ExpressionOperator) logToPhyMap.get(op.getRhsOperand()));
        LogicalPlan lp = op.getPlan();

        currentPlan.add(exprOp);
        logToPhyMap.put(op, exprOp);
View Full Code Here

    }

    @Override
    protected void visit(LOMod op) throws VisitorException {
        String scope = op.getOperatorKey().scope;
        BinaryExpressionOperator exprOp = new Mod(new OperatorKey(scope,
                nodeGen.getNextNodeId(scope)), op.getRequestedParallelism());
        exprOp.setAlias(op.getAlias());
        exprOp.setResultType(op.getType());
        exprOp.setLhs((ExpressionOperator) logToPhyMap.get(op.getLhsOperand()));
        exprOp.setRhs((ExpressionOperator) logToPhyMap.get(op.getRhsOperand()));
        LogicalPlan lp = op.getPlan();

        currentPlan.add(exprOp);
        logToPhyMap.put(op, exprOp);
View Full Code Here

        }
    }
   
    @Override
    public void visit( AddExpression op ) throws FrontendException {       
        BinaryExpressionOperator exprOp = new Add(new OperatorKey(DEFAULT_SCOPE, nodeGen.getNextNodeId(DEFAULT_SCOPE)));       
       
        attachBinaryExpressionOperator(op, exprOp);
    }
View Full Code Here

        attachBinaryExpressionOperator(op, exprOp);
    }
   
    @Override
    public void visit( RegexExpression op ) throws FrontendException {       
        BinaryExpressionOperator exprOp = new PORegexp(new OperatorKey(DEFAULT_SCOPE, nodeGen.getNextNodeId(DEFAULT_SCOPE)));       
       
        attachBinaryExpressionOperator(op, exprOp);
       
        List<Operator> successors = op.getPlan().getSuccessors(op);
        if (successors.get(1) instanceof org.apache.pig.newplan.logical.expression.ConstantExpression) {
View Full Code Here

        }
    }
   
    @Override
    public void visit( SubtractExpression op ) throws FrontendException {       
        BinaryExpressionOperator exprOp = new Subtract(new OperatorKey(DEFAULT_SCOPE, nodeGen.getNextNodeId(DEFAULT_SCOPE)));       
       
        attachBinaryExpressionOperator(op, exprOp);
    }
View Full Code Here

        attachBinaryExpressionOperator(op, exprOp);
    }
   
    @Override
    public void visit( MultiplyExpression op ) throws FrontendException {       
        BinaryExpressionOperator exprOp = new Multiply(new OperatorKey(DEFAULT_SCOPE, nodeGen.getNextNodeId(DEFAULT_SCOPE)));       
       
        attachBinaryExpressionOperator(op, exprOp);
    }
View Full Code Here

TOP

Related Classes of org.apache.pig.backend.hadoop.executionengine.physicalLayer.expressionOperators.BinaryExpressionOperator

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.