You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by "Alan Gates (JIRA)" <ji...@apache.org> on 2010/12/08 22:43:01 UTC

[jira] Commented: (PIG-1755) Clean up duplicated code in Physical Operators

    [ https://issues.apache.org/jira/browse/PIG-1755?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12969503#action_12969503 ] 

Alan Gates commented on PIG-1755:
---------------------------------

In the new PhysicalOperator.getNext(Object, Class) you don't handle DataByteArrays.  Why not?  These should be a simple type like String et. al.

This patch seems to be predicated on the assumption that o.class == o.class is faster than instanceof.  I assumed the latter was implemented as the former.  Am I missing something?

Have you done any performance testing on this to see if it makes a noticeable difference?

I like the code cleanup.

I've started the test-patch and ant test runs.

> Clean up duplicated code in Physical Operators
> ----------------------------------------------
>
>                 Key: PIG-1755
>                 URL: https://issues.apache.org/jira/browse/PIG-1755
>             Project: Pig
>          Issue Type: Improvement
>            Reporter: Dmitriy V. Ryaboy
>            Assignee: Dmitriy V. Ryaboy
>            Priority: Minor
>             Fix For: 0.9.0
>
>         Attachments: PIG-1755.patch
>
>
> A lot of the getNext() implementations in PhysicalOperators is copy-pasted, with only the method signatures and casts changing. 
> Shorter code leads to less bugs and is easier to read.

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