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

Examples of org.apache.pig.backend.hadoop.executionengine.physicalLayer.Result


        return res;
    }
   
    @Override
    public Result getNext(Integer i) throws ExecException {
        Result r = accumChild(null, i);
        if (r != null) {
            return r;
        }
       
        byte status;
        Result res;
        Integer left = null, right = null;
        res = lhs.getNext(left);
        status = res.returnStatus;
        if(status != POStatus.STATUS_OK || res.result == null) {
            return res;
View Full Code Here


        return res;
    }
   
    @Override
    public Result getNext(Long l) throws ExecException {
        Result r = accumChild(null, l);
        if (r != null) {
            return r;
        }
       
        byte status;
        Result res;
        Long left = null, right = null;
        res = lhs.getNext(left);
        status = res.returnStatus;
        if(status != POStatus.STATUS_OK || res.result == null) {
            return res;
View Full Code Here

        return false;
    }
   
    @Override
    public Result processInput() throws ExecException {
        Result res = new Result();
        Map<String, Object> inpValue = null;
        if (input == null && (inputs == null || inputs.size()==0)) {
//            log.warn("No inputs found. Signaling End of Processing.");
            res.returnStatus = POStatus.STATUS_EOP;
            return res;
View Full Code Here

        }
    }
   
    @SuppressWarnings("unchecked")
    private Result getNext() throws ExecException {
        Result res = processInput();
        if(res.result != null && res.returnStatus == POStatus.STATUS_OK) {
            res.result = ((Map<String, Object>)res.result).get(key);
        }
        return res;
    }
View Full Code Here

        return "And" + "[" + DataType.findTypeName(resultType) + "]" +" - " + mKey.toString();
    }

    @Override
    public Result getNext(Boolean b) throws ExecException {
        Result r = accumChild(null, dummyBool);
        if (r != null) {
            return r;
        }
       
        Result left;
        left = lhs.getNext(dummyBool);
        // pass on ERROR and EOP
        if(left.returnStatus != POStatus.STATUS_OK && left.returnStatus != POStatus.STATUS_NULL) {
            return left;
        }
       
        // truth table for AND
        // t = true, n = null, f = false
        //    AND  t n f
        // 1) t    t n f
        // 2) n    n n f
        // 3) f    f f f
       
        // Short circuit - if lhs is false, return false; ROW 3 above is handled with this
        if (left.result != null && !(((Boolean)left.result).booleanValue())) return left;
       
        Result right = rhs.getNext(dummyBool);
        // pass on ERROR and EOP
        if(right.returnStatus != POStatus.STATUS_OK && right.returnStatus != POStatus.STATUS_NULL) {
            return right;
        }
       
View Full Code Here

    }

    @Override
    public Result getNext(Boolean bool) throws ExecException {
        byte status;
        Result left, right;

        switch (operandType) {
        case DataType.BYTEARRAY: {
            Result r = accumChild(null, dummyDBA);
            if (r != null) {
                return r;
            }         
            left = lhs.getNext(dummyDBA);
            right = rhs.getNext(dummyDBA);
            return doComparison(left, right);
                            }

        case DataType.DOUBLE: {
            Result r = accumChild(null, dummyDouble);
            if (r != null) {
                return r;
            }         
            left = lhs.getNext(dummyDouble);
            right = rhs.getNext(dummyDouble);
            return doComparison(left, right);
                            }

        case DataType.FLOAT: {
            Result r = accumChild(null, dummyFloat);
            if (r != null) {
                return r;
            }
            left = lhs.getNext(dummyFloat);
            right = rhs.getNext(dummyFloat);
            return doComparison(left, right);
                            }

        case DataType.INTEGER: {
            Result r = accumChild(null, dummyInt);
            if (r != null) {
                return r;
            }
            left = lhs.getNext(dummyInt);
            right = rhs.getNext(dummyInt);
            return doComparison(left, right);
                            }

        case DataType.LONG: {
            Result r = accumChild(null, dummyLong);
            if (r != null) {
                return r;
            }
            left = lhs.getNext(dummyLong);
            right = rhs.getNext(dummyLong);
            return doComparison(left, right);
                            }

        case DataType.CHARARRAY: {
            Result r = accumChild(null, dummyString);
            if (r != null) {
                return r;
            }
            left = lhs.getNext(dummyString);
            right = rhs.getNext(dummyString);
View Full Code Here

        return "PONegative" + "[" + DataType.findTypeName(resultType) + "]" +" - " + mKey.toString();
    }

    @Override
    public Result getNext(Double d) throws ExecException {
        Result res = expr.getNext(d);
        if(res.returnStatus == POStatus.STATUS_OK && res.result!=null) {
                 res.result = -1*((Double)res.result);

       }
      
View Full Code Here

        return res;
    }

    @Override
    public Result getNext(Float f) throws ExecException {
        Result res = expr.getNext(f);
        if(res.returnStatus == POStatus.STATUS_OK && res.result!=null ) {
            res.result = -1*((Float)res.result);
        }
        return res;
    }
View Full Code Here

        return res;
    }

    @Override
    public Result getNext(Integer i) throws ExecException {
        Result res = expr.getNext(i);
        if(res.returnStatus == POStatus.STATUS_OK && res.result!=null ) {
            res.result = -1*((Integer)res.result);
        }
        return res;
    }
View Full Code Here

        return res;
    }

    @Override
    public Result getNext(Long l) throws ExecException {
        Result res = expr.getNext(l);
        if(res.returnStatus == POStatus.STATUS_OK && res.result!=null) {
            res.result = -1*((Long)res.result);
        }
        return res;
    }
View Full Code Here

TOP

Related Classes of org.apache.pig.backend.hadoop.executionengine.physicalLayer.Result

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.