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-353) Certain parse errors force exit from grunt (interactive mode)
Date Wed, 20 Aug 2008 12:16:47 GMT

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

Santhosh Srinivasan updated PIG-353:

    Attachment: bag_schema_bag_constant_as_clause.patch

Patch fixes the following issues:

1. Grunt parser can disambiguate '{' amongst the foreach nesting, bag constant and bag schema

2. The AS clause in conjunction with generate works. Fully qualified schema specified with
the AS clause is set correctly.

When a column is aliased in the generate statement, the schema should be fully qualified.
The patch failed testSUM1 in TestTypeChecking.java. A column cast to type long was aliased
as age. Since the type information for age was not specified, bytearray is inferred as the
type. Casts to bytearray are not supported. As a result, the type checker flagged this as
an error. In order to fix, the alias had to be fully qualified, i.e., age:long


//old code
LogicalPlan plan1 = planTester.buildPlan("b = foreach a generate (long)age as age, (int)gpa
as gpa;") ;

//modified code
LogicalPlan plan1 = planTester.buildPlan("b = foreach a generate (long)age as age:long, (int)gpa
as gpa:int;") ;

Unit tests that still fail are:

    [junit] Running org.apache.pig.test.TestBuiltin
    [junit] Tests run: 23, Failures: 1, Errors: 2, Time elapsed: 14.297 sec
    [junit] Test org.apache.pig.test.TestBuiltin FAILED

    [junit] Running org.apache.pig.test.TestEvalPipeline
    [junit] Tests run: 9, Failures: 1, Errors: 0, Time elapsed: 145.656 sec
    [junit] Test org.apache.pig.test.TestEvalPipeline FAILED

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

    [junit] Running org.apache.pig.test.TestMRCompiler
    [junit] Tests run: 16, Failures: 1, Errors: 0, Time elapsed: 0.37 sec
    [junit] Test org.apache.pig.test.TestMRCompiler FAILED

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

> Certain parse errors force exit from grunt (interactive mode)
> -------------------------------------------------------------
>                 Key: PIG-353
>                 URL: https://issues.apache.org/jira/browse/PIG-353
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: types_branch
>            Reporter: Olga Natkovich
>            Assignee: Santhosh Srinivasan
>             Fix For: types_branch
>         Attachments: bag_schema_bag_constant_as_clause.patch, bag_schema_in_pigscript_parser.patch
> I tried the following load:
> A = load 'foo' as (B: bag{T: tuple(I: int)});
> and it gave me a huge stack and through me out of grunt

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

View raw message