[
https://issues.apache.org/jira/browse/PIG-2337?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13138652#comment-13138652
]
Daniel Dai commented on PIG-2337:
---------------------------------
Currently, if users want input schema for EvalFunc, they need to do it
themselves:
1. In front end, serialize the schema and put in UDFContext in method
outputSchema
2. In the backend, deserialize the schema from UDFContext.
The sample use case can be found in TestSchema.InputSchemaUDF
(https://svn.apache.org/repos/asf/pig/trunk/test/org/apache/pig/test/TestSchema.java)
This process is quite involved and we shall to do it automatically. This
involves:
1. In front end, we serialize the schema and put in UDFContext for every
EvalFunc
2. In the backend, deserialize the schema for every EvalFunc
3. User can use EvalFunc.getSchema() to retrieve input schema for this EvalFunc
To do this, we need a unique signature for EvalFunc so we can use it as a key
to store to/retrieve from UDFContext. This mechanism is not there yet and it is
tracked in PIG-2338
> Provide UDF with input schema
> -----------------------------
>
> Key: PIG-2337
> URL: https://issues.apache.org/jira/browse/PIG-2337
> Project: Pig
> Issue Type: Improvement
> Reporter: Olga Natkovich
> Assignee: xuting zhao
> Fix For: 0.11
>
>
> We have several requests to make input schema available to the UDF for
> inspection.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira