src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/expressionOperators/LTOrEqualToExpr.java [59:107]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    @Override
    public Result getNextBoolean() throws ExecException {
        Result left, right;

        switch (operandType) {
        case DataType.BYTEARRAY:
        case DataType.DOUBLE:
        case DataType.FLOAT:
        case DataType.INTEGER:
        case DataType.BIGINTEGER:
        case DataType.BIGDECIMAL:
        case DataType.LONG:
        case DataType.DATETIME:
        case DataType.CHARARRAY: {
            Result r = accumChild(null, operandType);
            if (r != null) {
                return r;
            }
            left = lhs.getNext(operandType);
            right = rhs.getNext(operandType);
            return doComparison(left, right);
        }
        default: {
            int errCode = 2067;
            String msg = this.getClass().getSimpleName() + " does not know how to " +
            "handle type: " + DataType.findTypeName(operandType);
            throw new ExecException(msg, errCode, PigException.BUG);
        }

        }
    }

    @SuppressWarnings("unchecked")
    private Result doComparison(Result left, Result right) {
        if (left.returnStatus != POStatus.STATUS_OK) {
            return left;
        }
        if (right.returnStatus != POStatus.STATUS_OK) {
            return right;
        }
        // if either operand is null, the result should be
        // null
        if(left.result == null || right.result == null) {
            left.result = null;
            left.returnStatus = POStatus.STATUS_OK;
            return left;
        }
        assert(left.result instanceof Comparable);
        assert(right.result instanceof Comparable);
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/expressionOperators/LessThanExpr.java [59:108]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    @Override
    public Result getNextBoolean() throws ExecException {
        Result left, right;

        switch (operandType) {
        case DataType.BYTEARRAY:
        case DataType.DOUBLE:
        case DataType.FLOAT:
        case DataType.INTEGER:
        case DataType.BIGINTEGER:
        case DataType.BIGDECIMAL:
        case DataType.LONG:
        case DataType.DATETIME:
        case DataType.CHARARRAY: {
            Result r = accumChild(null, operandType);
            if (r != null) {
                return r;
            }
            left = lhs.getNext(operandType);
            right = rhs.getNext(operandType);
            return doComparison(left, right);
        }

        default: {
            int errCode = 2067;
            String msg = this.getClass().getSimpleName() + " does not know how to " +
            "handle type: " + DataType.findTypeName(operandType);
            throw new ExecException(msg, errCode, PigException.BUG);
        }

        }
    }

    @SuppressWarnings("unchecked")
    private Result doComparison(Result left, Result right) {
        if (left.returnStatus != POStatus.STATUS_OK) {
            return left;
        }
        if (right.returnStatus != POStatus.STATUS_OK) {
            return right;
        }
        // if either operand is null, the result should be
        // null
        if(left.result == null || right.result == null) {
            left.result = null;
            left.returnStatus = POStatus.STATUS_OK;
            return left;
        }
        assert(left.result instanceof Comparable);
        assert(right.result instanceof Comparable);
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



