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

[jira] Commented: (PIG-1460) UDF manual and javadocs should make clear how to use RequiredFieldList

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

Daniel Dai commented on PIG-1460:
---------------------------------

Hi, Corinne,
Can you update Pig UDF Manual? After section "LoadPushDown", add a subsection (pushProjection() is a method of LoadPushDown (also help to polish my writing):

pushProjection(): This method tells LoadFunc which fields is used in Pig, so LoadFunc is able to optimize not to load unneeded fields. pushProjection takes a RequiredFieldList. Each item inside RequiredFieldList indicates a required field Pig needs. Pig will use column index RequiredField.index to communicate with the LoadFunc about the fields Pig needs. If the field is a map, Pig will optionally pass RequiredField.subFields which contains a list of keys Pig needs for that map. For example, if we need two keys "key1", "key2" for the map, we will have a subFields for that map which contains two RequiredField. The alias field for 1st RequiredField is "key1", alias field for 2nd RequiredField is "key2". RequiredField.type is reserved for future use. LoadFunc will use RequiredFieldResponse.requiredFieldRequestHonored to indicate whether the pushProjection request is honored.

> UDF manual and javadocs should make clear how to use RequiredFieldList
> ----------------------------------------------------------------------
>
>                 Key: PIG-1460
>                 URL: https://issues.apache.org/jira/browse/PIG-1460
>             Project: Pig
>          Issue Type: Bug
>          Components: documentation
>    Affects Versions: 0.7.0
>            Reporter: Alan Gates
>            Assignee: Daniel Dai
>            Priority: Minor
>             Fix For: 0.8.0
>
>         Attachments: PIG-1460-1.patch
>
>
> The UDF manual mentions that load function writers need to handle RequiredFieldList passed to LoadPushDown.pushProjection, but it does not specify how the writer should interpret the contents of that list.  The javadoc is similarly vague. 

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