[
https://issues.apache.org/jira/browse/PIG-1755?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12969510#action_12969510
]
Dmitriy V. Ryaboy commented on PIG-1755:
----------------------------------------
It occurred to me after posting this patch that it would be better to use the
DataType enums instead of classes -- for one thing, that would allow me to do
the same for maps, etc. I'll rewrite when I get an hour.
instanceof is slower because HashMap foo is an instance of Map, but the classes
are different. It has to walk the inheritance tree.
> 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.