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

Ashutosh Chauhan commented on PIG-1292:
---------------------------------------

Thanks for review, Xuefu.

1. Thats a valid point. Where possible we want loadfunc implementers to deal 
with Hadoop concepts and not with Pig concepts.

2. So, lets assume there is a loader which is capable of  implementing this 
interface but only if underlying data is sorted (information which is available 
to loader only at run-time). Now this loader will implement this interface, 
indicating to Pig it is capable of doing it. But just because it is capable of 
doing it, doesn't necessarily imply it will do it (possibly because of 
performance reasons). Then, when Pig calls the method of interface, it is 
communicating to loader that it wants data in particular fashion, no matter 
what. Inside this method, loader may come to know about some metadata (like 
data is not sorted, possibly by reading its schema or contacting some metadata 
repo) and decides that it cant honor the contract because of information which 
is available to it only at run time. Then, loader may return false for the 
method. Pig may then choose to rewrite the query and still carry-on the 
execution. Because of these scenarios, I think having a boolean return value is 
useful. what do you think?

3. Can't come up with better name. Feel free to suggest :)

> Interface Refinements
> ---------------------
>
>                 Key: PIG-1292
>                 URL: https://issues.apache.org/jira/browse/PIG-1292
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: 0.7.0
>            Reporter: Ashutosh Chauhan
>            Assignee: Ashutosh Chauhan
>             Fix For: 0.7.0
>
>         Attachments: pig-interfaces.patch
>
>
> A loader can't implement both OrderedLoadFunc and IndexableLoadFunc, as both 
> are abstract classes instead of being interfaces.

-- 
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