hadoop-pig-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Santhosh Srinivasan (JIRA)" <j...@apache.org>
Subject [jira] Updated: (PIG-320) The parser/type checker should use the getSchema method of UDFs to deduce return type/schema
Date Thu, 17 Jul 2008 06:27:31 GMT

     [ https://issues.apache.org/jira/browse/PIG-320?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Santhosh Srinivasan updated PIG-320:
------------------------------------

    Attachment: udf_outputSchema.patch

The patch udf_outputSchema.patch adds the following:

1. The type checker uses the outputSchema method in EvalFunc to deduce the output schema of
the UDF

2. The TestEvalPipeline.java:testBagFunctionWithFlattening passes the unit test cases with
the addition of outputSchema method to the UDFs used inside the test case

3. Adds resetSchema method to relational operators that rely on nested plans to compute schemas.

4. Resets schema of all the relational operators in the type checker to ensure correctness
of the computed schema due to changes in the inputs of the operators. 

Unit test cases that still fail are:

    [junit] Running org.apache.pig.test.TestFilterOpNumeric
    [junit] Tests run: 8, Failures: 0, Errors: 1, Time elapsed: 56.735 sec
    [junit] Test org.apache.pig.test.TestFilterOpNumeric FAILED

    [junit] Running org.apache.pig.test.TestStoreOld
    [junit] Tests run: 3, Failures: 0, Errors: 2, Time elapsed: 21.46 sec
    [junit] Test org.apache.pig.test.TestStoreOld FAILED

> The parser/type checker should use the getSchema method of UDFs to deduce return type/schema
> --------------------------------------------------------------------------------------------
>
>                 Key: PIG-320
>                 URL: https://issues.apache.org/jira/browse/PIG-320
>             Project: Pig
>          Issue Type: Bug
>          Components: impl
>    Affects Versions: types_branch
>            Reporter: Santhosh Srinivasan
>            Assignee: Santhosh Srinivasan
>             Fix For: types_branch
>
>         Attachments: udf_outputSchema.patch
>
>
> Currently, the parser/type checker uses the getReturnType to deduce the return type of
the user defined function (UDF). This mechanism is satisfactory only for basic types (int,
long, ...); for composite types (tuple, bag), the schema is also required.The abstract class
EvalFunc interface exposes the outputSchema to deduce the return type/schema of the UDF. The
parser/type checker should use this method to figure out the return type/schema of the UDF
and use it appropriately. 

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


Mime
View raw message