You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by "Santhosh Srinivasan (JIRA)" <ji...@apache.org> on 2008/07/02 23:14:45 UTC

[jira] Created: (PIG-287) Explicit cast as int results in NULL

Explicit cast as int results in NULL
------------------------------------

                 Key: PIG-287
                 URL: https://issues.apache.org/jira/browse/PIG-287
             Project: Pig
          Issue Type: Bug
          Components: impl
    Affects Versions: types_branch
            Reporter: Santhosh Srinivasan


A new test case (testNestedPlan) added to TestEvalPipeline has the following query:

        pig.registerQuery("A = LOAD 'file:" + tmpFile + "';");
        pig.registerQuery("B = group A by $0;");
        + "C1 = filter A by $0 > -1;"
        + "C2 = distinct C1;"
        + "C3 = distinct A;"
        + "generate (int)group;"
        + "};";

Expected:

(0)
(1)
(2)
(3)
(4)
(5)
(6)
(7)
(8)
(9)

Got:

(NULL)
(NULL)
(NULL)
(NULL)
(NULL)
(NULL)
(NULL)
(NULL)
(NULL)
(NULL)


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


[jira] Updated: (PIG-287) Explicit cast as int results in NULL

Posted by "Santhosh Srinivasan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PIG-287?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Santhosh Srinivasan updated PIG-287:
------------------------------------

    Attachment: cast_for_bytearrray_test.patch

The issue with cast was resolved with Alan's fix for the 100 bytes long byte array issue. I have modified the test case testNestedPlan in TestEvalPipeline.java to check for the cast. The patch contains the modified test case.

The unit tests that are still failing are:

    [junit] Running org.apache.pig.test.TestEvalPipeline
    [junit] Tests run: 8, Failures: 0, Errors: 1, Time elapsed: 201.12 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: 55.618 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: 39.291 sec
    [junit] Test org.apache.pig.test.TestStoreOld FAILED


> Explicit cast as int results in NULL
> ------------------------------------
>
>                 Key: PIG-287
>                 URL: https://issues.apache.org/jira/browse/PIG-287
>             Project: Pig
>          Issue Type: Bug
>          Components: impl
>    Affects Versions: types_branch
>            Reporter: Santhosh Srinivasan
>         Attachments: cast_for_bytearrray_test.patch
>
>
> A new test case (testNestedPlan) added to TestEvalPipeline has the following query:
>         pig.registerQuery("A = LOAD 'file:" + tmpFile + "';");
>         pig.registerQuery("B = group A by $0;");
>         + "C1 = filter A by $0 > -1;"
>         + "C2 = distinct C1;"
>         + "C3 = distinct A;"
>         + "generate (int)group;"
>         + "};";
> Expected:
> (0)
> (1)
> (2)
> (3)
> (4)
> (5)
> (6)
> (7)
> (8)
> (9)
> Got:
> (NULL)
> (NULL)
> (NULL)
> (NULL)
> (NULL)
> (NULL)
> (NULL)
> (NULL)
> (NULL)
> (NULL)

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


[jira] Commented: (PIG-287) Explicit cast as int results in NULL

Posted by "Pi Song (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIG-287?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12610235#action_12610235 ] 

Pi Song commented on PIG-287:
-----------------------------

Please also attach the unit test code.

> Explicit cast as int results in NULL
> ------------------------------------
>
>                 Key: PIG-287
>                 URL: https://issues.apache.org/jira/browse/PIG-287
>             Project: Pig
>          Issue Type: Bug
>          Components: impl
>    Affects Versions: types_branch
>            Reporter: Santhosh Srinivasan
>
> A new test case (testNestedPlan) added to TestEvalPipeline has the following query:
>         pig.registerQuery("A = LOAD 'file:" + tmpFile + "';");
>         pig.registerQuery("B = group A by $0;");
>         + "C1 = filter A by $0 > -1;"
>         + "C2 = distinct C1;"
>         + "C3 = distinct A;"
>         + "generate (int)group;"
>         + "};";
> Expected:
> (0)
> (1)
> (2)
> (3)
> (4)
> (5)
> (6)
> (7)
> (8)
> (9)
> Got:
> (NULL)
> (NULL)
> (NULL)
> (NULL)
> (NULL)
> (NULL)
> (NULL)
> (NULL)
> (NULL)
> (NULL)

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


[jira] Resolved: (PIG-287) Explicit cast as int results in NULL

Posted by "Alan Gates (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PIG-287?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alan Gates resolved PIG-287.
----------------------------

       Resolution: Duplicate
    Fix Version/s: types_branch

duplicate of PIG-289

> Explicit cast as int results in NULL
> ------------------------------------
>
>                 Key: PIG-287
>                 URL: https://issues.apache.org/jira/browse/PIG-287
>             Project: Pig
>          Issue Type: Bug
>          Components: impl
>    Affects Versions: types_branch
>            Reporter: Santhosh Srinivasan
>             Fix For: types_branch
>
>         Attachments: cast_for_bytearrray_test.patch
>
>
> A new test case (testNestedPlan) added to TestEvalPipeline has the following query:
>         pig.registerQuery("A = LOAD 'file:" + tmpFile + "';");
>         pig.registerQuery("B = group A by $0;");
>         + "C1 = filter A by $0 > -1;"
>         + "C2 = distinct C1;"
>         + "C3 = distinct A;"
>         + "generate (int)group;"
>         + "};";
> Expected:
> (0)
> (1)
> (2)
> (3)
> (4)
> (5)
> (6)
> (7)
> (8)
> (9)
> Got:
> (NULL)
> (NULL)
> (NULL)
> (NULL)
> (NULL)
> (NULL)
> (NULL)
> (NULL)
> (NULL)
> (NULL)

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