Hadoop QA commented on PIG-513:

+1 overall.  Here are the results of testing the latest attachment 
  against trunk revision 817739.

    +1 @author.  The patch does not contain any @author tags.

    +1 tests included.  The patch appears to include 3 new or modified tests.

    +1 javadoc.  The javadoc tool did not generate any warning messages.

    +1 javac.  The applied patch does not increase the total number of javac 
compiler warnings.

    +1 findbugs.  The patch does not introduce any new Findbugs warnings.

    +1 release audit.  The applied patch does not increase the total number of 
release audit warnings.

    +1 core tests.  The patch passed core unit tests.

    +1 contrib tests.  The patch passed contrib unit tests.

Test results: 
Findbugs warnings: 
Console output: 

This message is automatically generated.

> PERFORMANCE: optimize some of the code in DefaultTuple
> ------------------------------------------------------
>                 Key: PIG-513
>                 URL: https://issues.apache.org/jira/browse/PIG-513
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: 0.2.0
>            Reporter: Pradeep Kamath
>            Assignee: Pradeep Kamath
>             Fix For: 0.6.0
>         Attachments: PIG-513-3.patch, PIG-513.patch, pig-513_2.patch
> The following areas in DefaultTuple.java can be changed:
> The member methods get(), set(), getType() and isNull() all call 
> checkBounds() which is redundant call since all these 4 functions throw 
> ExecException. Instead of doing a bounds check, we can catch the 
> IndexOutOfBounds exception in a try-catch and throw it as an ExecException
> The write() method has the following unused object (d in the code below):
> {code}
> for (int i = 0; i < sz; i++) {
>                 try {
>                     Object d = get(i);
>                 } catch (ExecException ee) {
>                     throw new RuntimeException(ee);
>                 }
>                 DataReaderWriter.writeDatum(out, mFields.get(i));
>             }
> {code}
> {noformat}
> The get(i) call in the try should be replaced by the writeDatum call directly 
> since d is never used and there is an unncessary call to get()
> {noformat}

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

Reply via email to