You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by "Viraj Bhat (JIRA)" <ji...@apache.org> on 2009/01/09 01:16:59 UTC

[jira] Created: (PIG-613) Casting elements inside a tuple does not take effect

Casting elements inside a tuple does not take effect
----------------------------------------------------

                 Key: PIG-613
                 URL: https://issues.apache.org/jira/browse/PIG-613
             Project: Pig
          Issue Type: Bug
          Components: impl
    Affects Versions: types_branch
            Reporter: Viraj Bhat
             Fix For: types_branch
         Attachments: myfloatdata.txt

Consider the following Pig script which casts return values of the SQUARE UDF which are  tuples of doubles to long. The describe output of B shows it is long, however the result is still double.
{code}
register statistics.jar;
A = load 'myfloatdata.txt' using PigStorage() as (doublecol:double);
B = foreach A generate (tuple(long))statistics.SQUARE(doublecol) as squares:(loadtimesq);
describe B;
explain B;
dump B;
{code}
===========================================
Describe output of B:
B: {squares: (loadtimesq: long)}
===========================================================
Sample output of B:
((7885.44))
((792098.2200010001))
((1497360.9268889998))
((50023.7956))
((0.972196))
((0.30980356))
((9.9760144E-7))
===========================================================
Cause: The cast for Tuples has not been implemented in POCast.java



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


[jira] Commented: (PIG-613) Casting elements inside a tuple does not take effect

Posted by "Hadoop QA (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIG-613?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12837547#action_12837547 ] 

Hadoop QA commented on PIG-613:
-------------------------------

-1 overall.  Here are the results of testing the latest attachment 
  http://issues.apache.org/jira/secure/attachment/12436788/PIG-613-2.patch
  against trunk revision 915578.

    +1 @author.  The patch does not contain any @author tags.

    +1 tests included.  The patch appears to include 22 new or modified tests.

    -1 patch.  The patch command could not apply the patch.

Console output: http://hudson.zones.apache.org/hudson/job/Pig-Patch-h8.grid.sp2.yahoo.net/219/console

This message is automatically generated.

> Casting elements inside a tuple does not take effect
> ----------------------------------------------------
>
>                 Key: PIG-613
>                 URL: https://issues.apache.org/jira/browse/PIG-613
>             Project: Pig
>          Issue Type: Bug
>          Components: impl
>    Affects Versions: 0.2.0
>            Reporter: Viraj Bhat
>            Assignee: Daniel Dai
>             Fix For: 0.7.0
>
>         Attachments: myfloatdata.txt, PIG-613-1.patch, PIG-613-2.patch, SQUARE.java
>
>
> Consider the following Pig script which casts return values of the SQUARE UDF which are  tuples of doubles to long. The describe output of B shows it is long, however the result is still double.
> {code}
> register statistics.jar;
> A = load 'myfloatdata.txt' using PigStorage() as (doublecol:double);
> B = foreach A generate (tuple(long))statistics.SQUARE(doublecol) as squares:(loadtimesq);
> describe B;
> explain B;
> dump B;
> {code}
> ===========================================
> Describe output of B:
> B: {squares: (loadtimesq: long)}
> ===========================================================
> Sample output of B:
> ((7885.44))
> ((792098.2200010001))
> ((1497360.9268889998))
> ((50023.7956))
> ((0.972196))
> ((0.30980356))
> ((9.9760144E-7))
> ===========================================================
> Cause: The cast for Tuples has not been implemented in POCast.java

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


[jira] Commented: (PIG-613) Casting elements inside a tuple does not take effect

Posted by "Daniel Dai (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIG-613?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12837973#action_12837973 ] 

Daniel Dai commented on PIG-613:
--------------------------------

Hudson does not work well, patch has been manually tested.

> Casting elements inside a tuple does not take effect
> ----------------------------------------------------
>
>                 Key: PIG-613
>                 URL: https://issues.apache.org/jira/browse/PIG-613
>             Project: Pig
>          Issue Type: Bug
>          Components: impl
>    Affects Versions: 0.2.0
>            Reporter: Viraj Bhat
>            Assignee: Daniel Dai
>             Fix For: 0.7.0
>
>         Attachments: myfloatdata.txt, PIG-613-1.patch, PIG-613-2.patch, SQUARE.java
>
>
> Consider the following Pig script which casts return values of the SQUARE UDF which are  tuples of doubles to long. The describe output of B shows it is long, however the result is still double.
> {code}
> register statistics.jar;
> A = load 'myfloatdata.txt' using PigStorage() as (doublecol:double);
> B = foreach A generate (tuple(long))statistics.SQUARE(doublecol) as squares:(loadtimesq);
> describe B;
> explain B;
> dump B;
> {code}
> ===========================================
> Describe output of B:
> B: {squares: (loadtimesq: long)}
> ===========================================================
> Sample output of B:
> ((7885.44))
> ((792098.2200010001))
> ((1497360.9268889998))
> ((50023.7956))
> ((0.972196))
> ((0.30980356))
> ((9.9760144E-7))
> ===========================================================
> Cause: The cast for Tuples has not been implemented in POCast.java

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


[jira] Closed: (PIG-613) Casting complex type(tuple/bag/map) does not take effect

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

Daniel Dai closed PIG-613.
--------------------------


> Casting complex type(tuple/bag/map) does not take effect
> --------------------------------------------------------
>
>                 Key: PIG-613
>                 URL: https://issues.apache.org/jira/browse/PIG-613
>             Project: Pig
>          Issue Type: Bug
>          Components: impl
>    Affects Versions: 0.2.0
>            Reporter: Viraj Bhat
>            Assignee: Daniel Dai
>             Fix For: 0.7.0
>
>         Attachments: myfloatdata.txt, PIG-613-1.patch, PIG-613-2.patch, SQUARE.java
>
>
> Consider the following Pig script which casts return values of the SQUARE UDF which are  tuples of doubles to long. The describe output of B shows it is long, however the result is still double.
> {code}
> register statistics.jar;
> A = load 'myfloatdata.txt' using PigStorage() as (doublecol:double);
> B = foreach A generate (tuple(long))statistics.SQUARE(doublecol) as squares:(loadtimesq);
> describe B;
> explain B;
> dump B;
> {code}
> ===========================================
> Describe output of B:
> B: {squares: (loadtimesq: long)}
> ===========================================================
> Sample output of B:
> ((7885.44))
> ((792098.2200010001))
> ((1497360.9268889998))
> ((50023.7956))
> ((0.972196))
> ((0.30980356))
> ((9.9760144E-7))
> ===========================================================
> Cause: The cast for Tuples has not been implemented in POCast.java

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


[jira] Commented: (PIG-613) Casting elements inside a tuple does not take effect

Posted by "Hadoop QA (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIG-613?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12837279#action_12837279 ] 

Hadoop QA commented on PIG-613:
-------------------------------

-1 overall.  Here are the results of testing the latest attachment 
  http://issues.apache.org/jira/secure/attachment/12436680/PIG-613-1.patch
  against trunk revision 915079.

    +1 @author.  The patch does not contain any @author tags.

    +1 tests included.  The patch appears to include 19 new or modified tests.

    -1 javadoc.  The javadoc tool appears to have generated 1 warning messages.

    +1 javac.  The applied patch does not increase the total number of javac compiler warnings.

    -1 findbugs.  The patch appears to introduce 1 new Findbugs warnings.

    +1 release audit.  The applied patch does not increase the total number of release audit warnings.

    -1 core tests.  The patch failed core unit tests.

    +1 contrib tests.  The patch passed contrib unit tests.

Test results: http://hudson.zones.apache.org/hudson/job/Pig-Patch-h8.grid.sp2.yahoo.net/217/testReport/
Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Pig-Patch-h8.grid.sp2.yahoo.net/217/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
Console output: http://hudson.zones.apache.org/hudson/job/Pig-Patch-h8.grid.sp2.yahoo.net/217/console

This message is automatically generated.

> Casting elements inside a tuple does not take effect
> ----------------------------------------------------
>
>                 Key: PIG-613
>                 URL: https://issues.apache.org/jira/browse/PIG-613
>             Project: Pig
>          Issue Type: Bug
>          Components: impl
>    Affects Versions: 0.2.0
>            Reporter: Viraj Bhat
>            Assignee: Daniel Dai
>             Fix For: 0.7.0
>
>         Attachments: myfloatdata.txt, PIG-613-1.patch, SQUARE.java
>
>
> Consider the following Pig script which casts return values of the SQUARE UDF which are  tuples of doubles to long. The describe output of B shows it is long, however the result is still double.
> {code}
> register statistics.jar;
> A = load 'myfloatdata.txt' using PigStorage() as (doublecol:double);
> B = foreach A generate (tuple(long))statistics.SQUARE(doublecol) as squares:(loadtimesq);
> describe B;
> explain B;
> dump B;
> {code}
> ===========================================
> Describe output of B:
> B: {squares: (loadtimesq: long)}
> ===========================================================
> Sample output of B:
> ((7885.44))
> ((792098.2200010001))
> ((1497360.9268889998))
> ((50023.7956))
> ((0.972196))
> ((0.30980356))
> ((9.9760144E-7))
> ===========================================================
> Cause: The cast for Tuples has not been implemented in POCast.java

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


[jira] Updated: (PIG-613) Casting elements inside a tuple does not take effect

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

Daniel Dai updated PIG-613:
---------------------------

    Attachment: PIG-1255-2.patch

Checked with hadoop guys. For Serializer/Deserializer, we should always open, but never close. There is another place in pig code does not follow this. Attach a new patch address both positions.

> Casting elements inside a tuple does not take effect
> ----------------------------------------------------
>
>                 Key: PIG-613
>                 URL: https://issues.apache.org/jira/browse/PIG-613
>             Project: Pig
>          Issue Type: Bug
>          Components: impl
>    Affects Versions: 0.2.0
>            Reporter: Viraj Bhat
>            Assignee: Daniel Dai
>             Fix For: 0.7.0
>
>         Attachments: myfloatdata.txt, PIG-613-1.patch, SQUARE.java
>
>
> Consider the following Pig script which casts return values of the SQUARE UDF which are  tuples of doubles to long. The describe output of B shows it is long, however the result is still double.
> {code}
> register statistics.jar;
> A = load 'myfloatdata.txt' using PigStorage() as (doublecol:double);
> B = foreach A generate (tuple(long))statistics.SQUARE(doublecol) as squares:(loadtimesq);
> describe B;
> explain B;
> dump B;
> {code}
> ===========================================
> Describe output of B:
> B: {squares: (loadtimesq: long)}
> ===========================================================
> Sample output of B:
> ((7885.44))
> ((792098.2200010001))
> ((1497360.9268889998))
> ((50023.7956))
> ((0.972196))
> ((0.30980356))
> ((9.9760144E-7))
> ===========================================================
> Cause: The cast for Tuples has not been implemented in POCast.java

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


[jira] Updated: (PIG-613) Casting elements inside a tuple does not take effect

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

Daniel Dai updated PIG-613:
---------------------------

    Attachment: PIG-613-1.patch

> Casting elements inside a tuple does not take effect
> ----------------------------------------------------
>
>                 Key: PIG-613
>                 URL: https://issues.apache.org/jira/browse/PIG-613
>             Project: Pig
>          Issue Type: Bug
>          Components: impl
>    Affects Versions: 0.2.0
>            Reporter: Viraj Bhat
>            Assignee: Daniel Dai
>             Fix For: 0.7.0
>
>         Attachments: myfloatdata.txt, PIG-613-1.patch, SQUARE.java
>
>
> Consider the following Pig script which casts return values of the SQUARE UDF which are  tuples of doubles to long. The describe output of B shows it is long, however the result is still double.
> {code}
> register statistics.jar;
> A = load 'myfloatdata.txt' using PigStorage() as (doublecol:double);
> B = foreach A generate (tuple(long))statistics.SQUARE(doublecol) as squares:(loadtimesq);
> describe B;
> explain B;
> dump B;
> {code}
> ===========================================
> Describe output of B:
> B: {squares: (loadtimesq: long)}
> ===========================================================
> Sample output of B:
> ((7885.44))
> ((792098.2200010001))
> ((1497360.9268889998))
> ((50023.7956))
> ((0.972196))
> ((0.30980356))
> ((9.9760144E-7))
> ===========================================================
> Cause: The cast for Tuples has not been implemented in POCast.java

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


[jira] Commented: (PIG-613) Casting elements inside a tuple does not take effect

Posted by "Richard Ding (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIG-613?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12837479#action_12837479 ] 

Richard Ding commented on PIG-613:
----------------------------------

The patch looks good. A few comments:

   * File TestTextDataParser.java should be removed.

   * In LoadCaster, javadoc is needed for the new parameters.  

   * In Utf8StorageConverter's bytesToTuple method, the cast to Tuple can be removed. Same for the cast in bytesToBag and bytesToMap. In consumeBag method, use consumeTuple instead of consumeComplexType to be more precise. In bytesToBoolean method, use Boolean.valueof to be consistent with other existing methods.  Also should the new helper methods consume{Bag, Tuple, Map} be private (not public)? 

   * The new methods added in impl.util.Utils class should be added to a test.util class since they are only used in the unit tests.

I maybe too picky here, but I would like to see more consistent coding style across files. For example, 

   * Use 4 spaces (not tab) for indentation: tabs are used in ResourceSchema. POCast, and TypeCheckingVisitor.



 



   

> Casting elements inside a tuple does not take effect
> ----------------------------------------------------
>
>                 Key: PIG-613
>                 URL: https://issues.apache.org/jira/browse/PIG-613
>             Project: Pig
>          Issue Type: Bug
>          Components: impl
>    Affects Versions: 0.2.0
>            Reporter: Viraj Bhat
>            Assignee: Daniel Dai
>             Fix For: 0.7.0
>
>         Attachments: myfloatdata.txt, PIG-613-1.patch, SQUARE.java
>
>
> Consider the following Pig script which casts return values of the SQUARE UDF which are  tuples of doubles to long. The describe output of B shows it is long, however the result is still double.
> {code}
> register statistics.jar;
> A = load 'myfloatdata.txt' using PigStorage() as (doublecol:double);
> B = foreach A generate (tuple(long))statistics.SQUARE(doublecol) as squares:(loadtimesq);
> describe B;
> explain B;
> dump B;
> {code}
> ===========================================
> Describe output of B:
> B: {squares: (loadtimesq: long)}
> ===========================================================
> Sample output of B:
> ((7885.44))
> ((792098.2200010001))
> ((1497360.9268889998))
> ((50023.7956))
> ((0.972196))
> ((0.30980356))
> ((9.9760144E-7))
> ===========================================================
> Cause: The cast for Tuples has not been implemented in POCast.java

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


[jira] Updated: (PIG-613) Casting elements inside a tuple does not take effect

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

Daniel Dai updated PIG-613:
---------------------------

    Status: Patch Available  (was: Open)

> Casting elements inside a tuple does not take effect
> ----------------------------------------------------
>
>                 Key: PIG-613
>                 URL: https://issues.apache.org/jira/browse/PIG-613
>             Project: Pig
>          Issue Type: Bug
>          Components: impl
>    Affects Versions: 0.2.0
>            Reporter: Viraj Bhat
>            Assignee: Daniel Dai
>             Fix For: 0.7.0
>
>         Attachments: myfloatdata.txt, PIG-613-1.patch, SQUARE.java
>
>
> Consider the following Pig script which casts return values of the SQUARE UDF which are  tuples of doubles to long. The describe output of B shows it is long, however the result is still double.
> {code}
> register statistics.jar;
> A = load 'myfloatdata.txt' using PigStorage() as (doublecol:double);
> B = foreach A generate (tuple(long))statistics.SQUARE(doublecol) as squares:(loadtimesq);
> describe B;
> explain B;
> dump B;
> {code}
> ===========================================
> Describe output of B:
> B: {squares: (loadtimesq: long)}
> ===========================================================
> Sample output of B:
> ((7885.44))
> ((792098.2200010001))
> ((1497360.9268889998))
> ((50023.7956))
> ((0.972196))
> ((0.30980356))
> ((9.9760144E-7))
> ===========================================================
> Cause: The cast for Tuples has not been implemented in POCast.java

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


[jira] Updated: (PIG-613) Casting elements inside a tuple does not take effect

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

Viraj Bhat updated PIG-613:
---------------------------

    Attachment: myfloatdata.txt

Test input file

> Casting elements inside a tuple does not take effect
> ----------------------------------------------------
>
>                 Key: PIG-613
>                 URL: https://issues.apache.org/jira/browse/PIG-613
>             Project: Pig
>          Issue Type: Bug
>          Components: impl
>    Affects Versions: types_branch
>            Reporter: Viraj Bhat
>             Fix For: types_branch
>
>         Attachments: myfloatdata.txt
>
>
> Consider the following Pig script which casts return values of the SQUARE UDF which are  tuples of doubles to long. The describe output of B shows it is long, however the result is still double.
> {code}
> register statistics.jar;
> A = load 'myfloatdata.txt' using PigStorage() as (doublecol:double);
> B = foreach A generate (tuple(long))statistics.SQUARE(doublecol) as squares:(loadtimesq);
> describe B;
> explain B;
> dump B;
> {code}
> ===========================================
> Describe output of B:
> B: {squares: (loadtimesq: long)}
> ===========================================================
> Sample output of B:
> ((7885.44))
> ((792098.2200010001))
> ((1497360.9268889998))
> ((50023.7956))
> ((0.972196))
> ((0.30980356))
> ((9.9760144E-7))
> ===========================================================
> Cause: The cast for Tuples has not been implemented in POCast.java

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


[jira] Updated: (PIG-613) Casting elements inside a tuple does not take effect

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

Daniel Dai updated PIG-613:
---------------------------

    Status: Patch Available  (was: Open)

> Casting elements inside a tuple does not take effect
> ----------------------------------------------------
>
>                 Key: PIG-613
>                 URL: https://issues.apache.org/jira/browse/PIG-613
>             Project: Pig
>          Issue Type: Bug
>          Components: impl
>    Affects Versions: 0.2.0
>            Reporter: Viraj Bhat
>            Assignee: Daniel Dai
>             Fix For: 0.7.0
>
>         Attachments: myfloatdata.txt, PIG-613-1.patch, SQUARE.java
>
>
> Consider the following Pig script which casts return values of the SQUARE UDF which are  tuples of doubles to long. The describe output of B shows it is long, however the result is still double.
> {code}
> register statistics.jar;
> A = load 'myfloatdata.txt' using PigStorage() as (doublecol:double);
> B = foreach A generate (tuple(long))statistics.SQUARE(doublecol) as squares:(loadtimesq);
> describe B;
> explain B;
> dump B;
> {code}
> ===========================================
> Describe output of B:
> B: {squares: (loadtimesq: long)}
> ===========================================================
> Sample output of B:
> ((7885.44))
> ((792098.2200010001))
> ((1497360.9268889998))
> ((50023.7956))
> ((0.972196))
> ((0.30980356))
> ((9.9760144E-7))
> ===========================================================
> Cause: The cast for Tuples has not been implemented in POCast.java

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


[jira] Updated: (PIG-613) Casting elements inside a tuple does not take effect

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

Daniel Dai updated PIG-613:
---------------------------

    Attachment: PIG-613-1.patch

> Casting elements inside a tuple does not take effect
> ----------------------------------------------------
>
>                 Key: PIG-613
>                 URL: https://issues.apache.org/jira/browse/PIG-613
>             Project: Pig
>          Issue Type: Bug
>          Components: impl
>    Affects Versions: 0.2.0
>            Reporter: Viraj Bhat
>            Assignee: Daniel Dai
>             Fix For: 0.7.0
>
>         Attachments: myfloatdata.txt, PIG-613-1.patch, SQUARE.java
>
>
> Consider the following Pig script which casts return values of the SQUARE UDF which are  tuples of doubles to long. The describe output of B shows it is long, however the result is still double.
> {code}
> register statistics.jar;
> A = load 'myfloatdata.txt' using PigStorage() as (doublecol:double);
> B = foreach A generate (tuple(long))statistics.SQUARE(doublecol) as squares:(loadtimesq);
> describe B;
> explain B;
> dump B;
> {code}
> ===========================================
> Describe output of B:
> B: {squares: (loadtimesq: long)}
> ===========================================================
> Sample output of B:
> ((7885.44))
> ((792098.2200010001))
> ((1497360.9268889998))
> ((50023.7956))
> ((0.972196))
> ((0.30980356))
> ((9.9760144E-7))
> ===========================================================
> Cause: The cast for Tuples has not been implemented in POCast.java

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


[jira] Updated: (PIG-613) Casting elements inside a tuple does not take effect

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

Daniel Dai updated PIG-613:
---------------------------

    Status: Patch Available  (was: Open)

> Casting elements inside a tuple does not take effect
> ----------------------------------------------------
>
>                 Key: PIG-613
>                 URL: https://issues.apache.org/jira/browse/PIG-613
>             Project: Pig
>          Issue Type: Bug
>          Components: impl
>    Affects Versions: 0.2.0
>            Reporter: Viraj Bhat
>            Assignee: Daniel Dai
>             Fix For: 0.7.0
>
>         Attachments: myfloatdata.txt, PIG-613-1.patch, PIG-613-2.patch, SQUARE.java
>
>
> Consider the following Pig script which casts return values of the SQUARE UDF which are  tuples of doubles to long. The describe output of B shows it is long, however the result is still double.
> {code}
> register statistics.jar;
> A = load 'myfloatdata.txt' using PigStorage() as (doublecol:double);
> B = foreach A generate (tuple(long))statistics.SQUARE(doublecol) as squares:(loadtimesq);
> describe B;
> explain B;
> dump B;
> {code}
> ===========================================
> Describe output of B:
> B: {squares: (loadtimesq: long)}
> ===========================================================
> Sample output of B:
> ((7885.44))
> ((792098.2200010001))
> ((1497360.9268889998))
> ((50023.7956))
> ((0.972196))
> ((0.30980356))
> ((9.9760144E-7))
> ===========================================================
> Cause: The cast for Tuples has not been implemented in POCast.java

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


[jira] Updated: (PIG-613) Casting elements inside a tuple does not take effect

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

Daniel Dai updated PIG-613:
---------------------------

    Fix Version/s: 0.7.0
         Assignee: Daniel Dai

> Casting elements inside a tuple does not take effect
> ----------------------------------------------------
>
>                 Key: PIG-613
>                 URL: https://issues.apache.org/jira/browse/PIG-613
>             Project: Pig
>          Issue Type: Bug
>          Components: impl
>    Affects Versions: 0.2.0
>            Reporter: Viraj Bhat
>            Assignee: Daniel Dai
>             Fix For: 0.7.0
>
>         Attachments: myfloatdata.txt, SQUARE.java
>
>
> Consider the following Pig script which casts return values of the SQUARE UDF which are  tuples of doubles to long. The describe output of B shows it is long, however the result is still double.
> {code}
> register statistics.jar;
> A = load 'myfloatdata.txt' using PigStorage() as (doublecol:double);
> B = foreach A generate (tuple(long))statistics.SQUARE(doublecol) as squares:(loadtimesq);
> describe B;
> explain B;
> dump B;
> {code}
> ===========================================
> Describe output of B:
> B: {squares: (loadtimesq: long)}
> ===========================================================
> Sample output of B:
> ((7885.44))
> ((792098.2200010001))
> ((1497360.9268889998))
> ((50023.7956))
> ((0.972196))
> ((0.30980356))
> ((9.9760144E-7))
> ===========================================================
> Cause: The cast for Tuples has not been implemented in POCast.java

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


[jira] Commented: (PIG-613) Casting elements inside a tuple does not take effect

Posted by "Richard Ding (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIG-613?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12837398#action_12837398 ] 

Richard Ding commented on PIG-613:
----------------------------------

Initial comment: the patch also needs to remove references to  package 'org.apache.pig.data.parser' from junit tests.

> Casting elements inside a tuple does not take effect
> ----------------------------------------------------
>
>                 Key: PIG-613
>                 URL: https://issues.apache.org/jira/browse/PIG-613
>             Project: Pig
>          Issue Type: Bug
>          Components: impl
>    Affects Versions: 0.2.0
>            Reporter: Viraj Bhat
>            Assignee: Daniel Dai
>             Fix For: 0.7.0
>
>         Attachments: myfloatdata.txt, PIG-613-1.patch, SQUARE.java
>
>
> Consider the following Pig script which casts return values of the SQUARE UDF which are  tuples of doubles to long. The describe output of B shows it is long, however the result is still double.
> {code}
> register statistics.jar;
> A = load 'myfloatdata.txt' using PigStorage() as (doublecol:double);
> B = foreach A generate (tuple(long))statistics.SQUARE(doublecol) as squares:(loadtimesq);
> describe B;
> explain B;
> dump B;
> {code}
> ===========================================
> Describe output of B:
> B: {squares: (loadtimesq: long)}
> ===========================================================
> Sample output of B:
> ((7885.44))
> ((792098.2200010001))
> ((1497360.9268889998))
> ((50023.7956))
> ((0.972196))
> ((0.30980356))
> ((9.9760144E-7))
> ===========================================================
> Cause: The cast for Tuples has not been implemented in POCast.java

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


[jira] Updated: (PIG-613) Casting complex type(tuple/bag/map) does not take effect

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

Daniel Dai updated PIG-613:
---------------------------

    Summary: Casting complex type(tuple/bag/map) does not take effect  (was: Casting elements inside a tuple does not take effect)

> Casting complex type(tuple/bag/map) does not take effect
> --------------------------------------------------------
>
>                 Key: PIG-613
>                 URL: https://issues.apache.org/jira/browse/PIG-613
>             Project: Pig
>          Issue Type: Bug
>          Components: impl
>    Affects Versions: 0.2.0
>            Reporter: Viraj Bhat
>            Assignee: Daniel Dai
>             Fix For: 0.7.0
>
>         Attachments: myfloatdata.txt, PIG-613-1.patch, PIG-613-2.patch, SQUARE.java
>
>
> Consider the following Pig script which casts return values of the SQUARE UDF which are  tuples of doubles to long. The describe output of B shows it is long, however the result is still double.
> {code}
> register statistics.jar;
> A = load 'myfloatdata.txt' using PigStorage() as (doublecol:double);
> B = foreach A generate (tuple(long))statistics.SQUARE(doublecol) as squares:(loadtimesq);
> describe B;
> explain B;
> dump B;
> {code}
> ===========================================
> Describe output of B:
> B: {squares: (loadtimesq: long)}
> ===========================================================
> Sample output of B:
> ((7885.44))
> ((792098.2200010001))
> ((1497360.9268889998))
> ((50023.7956))
> ((0.972196))
> ((0.30980356))
> ((9.9760144E-7))
> ===========================================================
> Cause: The cast for Tuples has not been implemented in POCast.java

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


[jira] Commented: (PIG-613) Casting elements inside a tuple does not take effect

Posted by "Daniel Dai (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIG-613?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12837471#action_12837471 ] 

Daniel Dai commented on PIG-613:
--------------------------------

Ignore last comment. It means to be for another Jira.

> Casting elements inside a tuple does not take effect
> ----------------------------------------------------
>
>                 Key: PIG-613
>                 URL: https://issues.apache.org/jira/browse/PIG-613
>             Project: Pig
>          Issue Type: Bug
>          Components: impl
>    Affects Versions: 0.2.0
>            Reporter: Viraj Bhat
>            Assignee: Daniel Dai
>             Fix For: 0.7.0
>
>         Attachments: myfloatdata.txt, PIG-613-1.patch, SQUARE.java
>
>
> Consider the following Pig script which casts return values of the SQUARE UDF which are  tuples of doubles to long. The describe output of B shows it is long, however the result is still double.
> {code}
> register statistics.jar;
> A = load 'myfloatdata.txt' using PigStorage() as (doublecol:double);
> B = foreach A generate (tuple(long))statistics.SQUARE(doublecol) as squares:(loadtimesq);
> describe B;
> explain B;
> dump B;
> {code}
> ===========================================
> Describe output of B:
> B: {squares: (loadtimesq: long)}
> ===========================================================
> Sample output of B:
> ((7885.44))
> ((792098.2200010001))
> ((1497360.9268889998))
> ((50023.7956))
> ((0.972196))
> ((0.30980356))
> ((9.9760144E-7))
> ===========================================================
> Cause: The cast for Tuples has not been implemented in POCast.java

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


[jira] Updated: (PIG-613) Casting elements inside a tuple does not take effect

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

Daniel Dai updated PIG-613:
---------------------------

    Status: Open  (was: Patch Available)

> Casting elements inside a tuple does not take effect
> ----------------------------------------------------
>
>                 Key: PIG-613
>                 URL: https://issues.apache.org/jira/browse/PIG-613
>             Project: Pig
>          Issue Type: Bug
>          Components: impl
>    Affects Versions: 0.2.0
>            Reporter: Viraj Bhat
>            Assignee: Daniel Dai
>             Fix For: 0.7.0
>
>         Attachments: myfloatdata.txt, PIG-613-1.patch, SQUARE.java
>
>
> Consider the following Pig script which casts return values of the SQUARE UDF which are  tuples of doubles to long. The describe output of B shows it is long, however the result is still double.
> {code}
> register statistics.jar;
> A = load 'myfloatdata.txt' using PigStorage() as (doublecol:double);
> B = foreach A generate (tuple(long))statistics.SQUARE(doublecol) as squares:(loadtimesq);
> describe B;
> explain B;
> dump B;
> {code}
> ===========================================
> Describe output of B:
> B: {squares: (loadtimesq: long)}
> ===========================================================
> Sample output of B:
> ((7885.44))
> ((792098.2200010001))
> ((1497360.9268889998))
> ((50023.7956))
> ((0.972196))
> ((0.30980356))
> ((9.9760144E-7))
> ===========================================================
> Cause: The cast for Tuples has not been implemented in POCast.java

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


[jira] Updated: (PIG-613) Casting elements inside a tuple does not take effect

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

Daniel Dai updated PIG-613:
---------------------------

    Attachment:     (was: PIG-1255-2.patch)

> Casting elements inside a tuple does not take effect
> ----------------------------------------------------
>
>                 Key: PIG-613
>                 URL: https://issues.apache.org/jira/browse/PIG-613
>             Project: Pig
>          Issue Type: Bug
>          Components: impl
>    Affects Versions: 0.2.0
>            Reporter: Viraj Bhat
>            Assignee: Daniel Dai
>             Fix For: 0.7.0
>
>         Attachments: myfloatdata.txt, PIG-613-1.patch, SQUARE.java
>
>
> Consider the following Pig script which casts return values of the SQUARE UDF which are  tuples of doubles to long. The describe output of B shows it is long, however the result is still double.
> {code}
> register statistics.jar;
> A = load 'myfloatdata.txt' using PigStorage() as (doublecol:double);
> B = foreach A generate (tuple(long))statistics.SQUARE(doublecol) as squares:(loadtimesq);
> describe B;
> explain B;
> dump B;
> {code}
> ===========================================
> Describe output of B:
> B: {squares: (loadtimesq: long)}
> ===========================================================
> Sample output of B:
> ((7885.44))
> ((792098.2200010001))
> ((1497360.9268889998))
> ((50023.7956))
> ((0.972196))
> ((0.30980356))
> ((9.9760144E-7))
> ===========================================================
> Cause: The cast for Tuples has not been implemented in POCast.java

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


[jira] Updated: (PIG-613) Casting elements inside a tuple does not take effect

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

Daniel Dai updated PIG-613:
---------------------------

    Status: Open  (was: Patch Available)

> Casting elements inside a tuple does not take effect
> ----------------------------------------------------
>
>                 Key: PIG-613
>                 URL: https://issues.apache.org/jira/browse/PIG-613
>             Project: Pig
>          Issue Type: Bug
>          Components: impl
>    Affects Versions: 0.2.0
>            Reporter: Viraj Bhat
>            Assignee: Daniel Dai
>             Fix For: 0.7.0
>
>         Attachments: myfloatdata.txt, PIG-613-1.patch, PIG-613-2.patch, SQUARE.java
>
>
> Consider the following Pig script which casts return values of the SQUARE UDF which are  tuples of doubles to long. The describe output of B shows it is long, however the result is still double.
> {code}
> register statistics.jar;
> A = load 'myfloatdata.txt' using PigStorage() as (doublecol:double);
> B = foreach A generate (tuple(long))statistics.SQUARE(doublecol) as squares:(loadtimesq);
> describe B;
> explain B;
> dump B;
> {code}
> ===========================================
> Describe output of B:
> B: {squares: (loadtimesq: long)}
> ===========================================================
> Sample output of B:
> ((7885.44))
> ((792098.2200010001))
> ((1497360.9268889998))
> ((50023.7956))
> ((0.972196))
> ((0.30980356))
> ((9.9760144E-7))
> ===========================================================
> Cause: The cast for Tuples has not been implemented in POCast.java

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


[jira] Updated: (PIG-613) Casting elements inside a tuple does not take effect

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

Daniel Dai updated PIG-613:
---------------------------

      Resolution: Fixed
    Hadoop Flags: [Reviewed]
          Status: Resolved  (was: Patch Available)

Patch committed.

> Casting elements inside a tuple does not take effect
> ----------------------------------------------------
>
>                 Key: PIG-613
>                 URL: https://issues.apache.org/jira/browse/PIG-613
>             Project: Pig
>          Issue Type: Bug
>          Components: impl
>    Affects Versions: 0.2.0
>            Reporter: Viraj Bhat
>            Assignee: Daniel Dai
>             Fix For: 0.7.0
>
>         Attachments: myfloatdata.txt, PIG-613-1.patch, PIG-613-2.patch, SQUARE.java
>
>
> Consider the following Pig script which casts return values of the SQUARE UDF which are  tuples of doubles to long. The describe output of B shows it is long, however the result is still double.
> {code}
> register statistics.jar;
> A = load 'myfloatdata.txt' using PigStorage() as (doublecol:double);
> B = foreach A generate (tuple(long))statistics.SQUARE(doublecol) as squares:(loadtimesq);
> describe B;
> explain B;
> dump B;
> {code}
> ===========================================
> Describe output of B:
> B: {squares: (loadtimesq: long)}
> ===========================================================
> Sample output of B:
> ((7885.44))
> ((792098.2200010001))
> ((1497360.9268889998))
> ((50023.7956))
> ((0.972196))
> ((0.30980356))
> ((9.9760144E-7))
> ===========================================================
> Cause: The cast for Tuples has not been implemented in POCast.java

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


[jira] Commented: (PIG-613) Casting elements inside a tuple does not take effect

Posted by "Daniel Dai (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIG-613?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12765402#action_12765402 ] 

Daniel Dai commented on PIG-613:
--------------------------------

Here is another example:

1.txt:
(0.2,0.3)

a = load '1.txt';
b = foreach a generate (tuple(int, int))$0;

describe b;
b: {(int,int)}

dump b;
((0.2,0.3))

The expect result is ((0, 0))

> Casting elements inside a tuple does not take effect
> ----------------------------------------------------
>
>                 Key: PIG-613
>                 URL: https://issues.apache.org/jira/browse/PIG-613
>             Project: Pig
>          Issue Type: Bug
>          Components: impl
>    Affects Versions: 0.2.0
>            Reporter: Viraj Bhat
>         Attachments: myfloatdata.txt, SQUARE.java
>
>
> Consider the following Pig script which casts return values of the SQUARE UDF which are  tuples of doubles to long. The describe output of B shows it is long, however the result is still double.
> {code}
> register statistics.jar;
> A = load 'myfloatdata.txt' using PigStorage() as (doublecol:double);
> B = foreach A generate (tuple(long))statistics.SQUARE(doublecol) as squares:(loadtimesq);
> describe B;
> explain B;
> dump B;
> {code}
> ===========================================
> Describe output of B:
> B: {squares: (loadtimesq: long)}
> ===========================================================
> Sample output of B:
> ((7885.44))
> ((792098.2200010001))
> ((1497360.9268889998))
> ((50023.7956))
> ((0.972196))
> ((0.30980356))
> ((9.9760144E-7))
> ===========================================================
> Cause: The cast for Tuples has not been implemented in POCast.java

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


[jira] Updated: (PIG-613) Casting elements inside a tuple does not take effect

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

Daniel Dai updated PIG-613:
---------------------------

    Attachment: PIG-613-2.patch

Attach patch to address Richard's comments and hudson feedback.

> Casting elements inside a tuple does not take effect
> ----------------------------------------------------
>
>                 Key: PIG-613
>                 URL: https://issues.apache.org/jira/browse/PIG-613
>             Project: Pig
>          Issue Type: Bug
>          Components: impl
>    Affects Versions: 0.2.0
>            Reporter: Viraj Bhat
>            Assignee: Daniel Dai
>             Fix For: 0.7.0
>
>         Attachments: myfloatdata.txt, PIG-613-1.patch, PIG-613-2.patch, SQUARE.java
>
>
> Consider the following Pig script which casts return values of the SQUARE UDF which are  tuples of doubles to long. The describe output of B shows it is long, however the result is still double.
> {code}
> register statistics.jar;
> A = load 'myfloatdata.txt' using PigStorage() as (doublecol:double);
> B = foreach A generate (tuple(long))statistics.SQUARE(doublecol) as squares:(loadtimesq);
> describe B;
> explain B;
> dump B;
> {code}
> ===========================================
> Describe output of B:
> B: {squares: (loadtimesq: long)}
> ===========================================================
> Sample output of B:
> ((7885.44))
> ((792098.2200010001))
> ((1497360.9268889998))
> ((50023.7956))
> ((0.972196))
> ((0.30980356))
> ((9.9760144E-7))
> ===========================================================
> Cause: The cast for Tuples has not been implemented in POCast.java

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


[jira] Updated: (PIG-613) Casting elements inside a tuple does not take effect

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

Viraj Bhat updated PIG-613:
---------------------------

    Attachment: SQUARE.java

SQUARE UDF

> Casting elements inside a tuple does not take effect
> ----------------------------------------------------
>
>                 Key: PIG-613
>                 URL: https://issues.apache.org/jira/browse/PIG-613
>             Project: Pig
>          Issue Type: Bug
>          Components: impl
>    Affects Versions: types_branch
>            Reporter: Viraj Bhat
>             Fix For: types_branch
>
>         Attachments: myfloatdata.txt, SQUARE.java
>
>
> Consider the following Pig script which casts return values of the SQUARE UDF which are  tuples of doubles to long. The describe output of B shows it is long, however the result is still double.
> {code}
> register statistics.jar;
> A = load 'myfloatdata.txt' using PigStorage() as (doublecol:double);
> B = foreach A generate (tuple(long))statistics.SQUARE(doublecol) as squares:(loadtimesq);
> describe B;
> explain B;
> dump B;
> {code}
> ===========================================
> Describe output of B:
> B: {squares: (loadtimesq: long)}
> ===========================================================
> Sample output of B:
> ((7885.44))
> ((792098.2200010001))
> ((1497360.9268889998))
> ((50023.7956))
> ((0.972196))
> ((0.30980356))
> ((9.9760144E-7))
> ===========================================================
> Cause: The cast for Tuples has not been implemented in POCast.java

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


[jira] Updated: (PIG-613) Casting elements inside a tuple does not take effect

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

Daniel Dai updated PIG-613:
---------------------------

    Attachment:     (was: PIG-613-1.patch)

> Casting elements inside a tuple does not take effect
> ----------------------------------------------------
>
>                 Key: PIG-613
>                 URL: https://issues.apache.org/jira/browse/PIG-613
>             Project: Pig
>          Issue Type: Bug
>          Components: impl
>    Affects Versions: 0.2.0
>            Reporter: Viraj Bhat
>            Assignee: Daniel Dai
>             Fix For: 0.7.0
>
>         Attachments: myfloatdata.txt, PIG-613-1.patch, SQUARE.java
>
>
> Consider the following Pig script which casts return values of the SQUARE UDF which are  tuples of doubles to long. The describe output of B shows it is long, however the result is still double.
> {code}
> register statistics.jar;
> A = load 'myfloatdata.txt' using PigStorage() as (doublecol:double);
> B = foreach A generate (tuple(long))statistics.SQUARE(doublecol) as squares:(loadtimesq);
> describe B;
> explain B;
> dump B;
> {code}
> ===========================================
> Describe output of B:
> B: {squares: (loadtimesq: long)}
> ===========================================================
> Sample output of B:
> ((7885.44))
> ((792098.2200010001))
> ((1497360.9268889998))
> ((50023.7956))
> ((0.972196))
> ((0.30980356))
> ((9.9760144E-7))
> ===========================================================
> Cause: The cast for Tuples has not been implemented in POCast.java

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