You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by "Xuefu Zhang (JIRA)" <ji...@apache.org> on 2011/03/22 18:59:06 UTC

[jira] [Created] (PIG-1929) Type checker failed to catch invalid type comparison

Type checker failed to catch invalid type comparison
----------------------------------------------------

                 Key: PIG-1929
                 URL: https://issues.apache.org/jira/browse/PIG-1929
             Project: Pig
          Issue Type: Bug
            Reporter: Xuefu Zhang
            Assignee: Thejas M Nair
             Fix For: 0.9.0


The following script should fail. However, it passed type checking, resulting a backend failure.

A =LOAD 'x' USING PigStorage() AS ( Fint:int, Flong:long, Fdouble:double, Ffloat:float, Fchar:chararray, Fchararray:chararray, Fbytearray:bytearray, Fmap:map[], Fbag:BAG{ t:tuple( name, age, avg ) }, Ftuple:( name:chararray, age:int, avg:float) );
B= FILTER A BY ( Ftuple gte ( 1, 2, 3 ));
STORE B INTO 'y' USING PigStorage();



--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (PIG-1929) Type checker failed to catch invalid type comparison

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

Thejas M Nair updated PIG-1929:
-------------------------------

    Attachment: PIG-1929.1.patch

PIG-1929.1.patch - the patch also has a fix for issue in PIG-1928.

> Type checker failed to catch invalid type comparison
> ----------------------------------------------------
>
>                 Key: PIG-1929
>                 URL: https://issues.apache.org/jira/browse/PIG-1929
>             Project: Pig
>          Issue Type: Bug
>            Reporter: Xuefu Zhang
>            Assignee: Thejas M Nair
>             Fix For: 0.9.0
>
>         Attachments: PIG-1929.1.patch
>
>
> The following script should fail. However, it passed type checking, resulting a backend failure.
> A =LOAD 'x' USING PigStorage() AS ( Fint:int, Flong:long, Fdouble:double, Ffloat:float, Fchar:chararray, Fchararray:chararray, Fbytearray:bytearray, Fmap:map[], Fbag:BAG{ t:tuple( name, age, avg ) }, Ftuple:( name:chararray, age:int, avg:float) );
> B= FILTER A BY ( Ftuple gte ( 1, 2, 3 ));
> STORE B INTO 'y' USING PigStorage();

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (PIG-1929) Type checker failed to catch invalid type comparison

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

Thejas M Nair updated PIG-1929:
-------------------------------

    Attachment: PIG-1929.2.patch

PIG-1929.2.patch - Removes code that cast null-constants for == and != expressions, as that will not get used. It will get typecast as bytearray expression. Added test cases for casting of null constants in comparison binary expressions.

> Type checker failed to catch invalid type comparison
> ----------------------------------------------------
>
>                 Key: PIG-1929
>                 URL: https://issues.apache.org/jira/browse/PIG-1929
>             Project: Pig
>          Issue Type: Bug
>            Reporter: Xuefu Zhang
>            Assignee: Thejas M Nair
>             Fix For: 0.9.0
>
>         Attachments: PIG-1929.1.patch, PIG-1929.2.patch
>
>
> The following script should fail. However, it passed type checking, resulting a backend failure.
> A =LOAD 'x' USING PigStorage() AS ( Fint:int, Flong:long, Fdouble:double, Ffloat:float, Fchar:chararray, Fchararray:chararray, Fbytearray:bytearray, Fmap:map[], Fbag:BAG{ t:tuple( name, age, avg ) }, Ftuple:( name:chararray, age:int, avg:float) );
> B= FILTER A BY ( Ftuple gte ( 1, 2, 3 ));
> STORE B INTO 'y' USING PigStorage();

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (PIG-1929) Type checker failed to catch invalid type comparison

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

Xuefu Zhang commented on PIG-1929:
----------------------------------

+1 for patch PIG-1929.3.patch.

> Type checker failed to catch invalid type comparison
> ----------------------------------------------------
>
>                 Key: PIG-1929
>                 URL: https://issues.apache.org/jira/browse/PIG-1929
>             Project: Pig
>          Issue Type: Bug
>            Reporter: Xuefu Zhang
>            Assignee: Thejas M Nair
>             Fix For: 0.9.0
>
>         Attachments: PIG-1929.1.patch, PIG-1929.2.patch, PIG-1929.3.patch
>
>
> The following script should fail. However, it passed type checking, resulting a backend failure.
> A =LOAD 'x' USING PigStorage() AS ( Fint:int, Flong:long, Fdouble:double, Ffloat:float, Fchar:chararray, Fchararray:chararray, Fbytearray:bytearray, Fmap:map[], Fbag:BAG{ t:tuple( name, age, avg ) }, Ftuple:( name:chararray, age:int, avg:float) );
> B= FILTER A BY ( Ftuple gte ( 1, 2, 3 ));
> STORE B INTO 'y' USING PigStorage();

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Resolved] (PIG-1929) Type checker failed to catch invalid type comparison

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

Thejas M Nair resolved PIG-1929.
--------------------------------

    Resolution: Fixed

Patch committed to trunk.

> Type checker failed to catch invalid type comparison
> ----------------------------------------------------
>
>                 Key: PIG-1929
>                 URL: https://issues.apache.org/jira/browse/PIG-1929
>             Project: Pig
>          Issue Type: Bug
>            Reporter: Xuefu Zhang
>            Assignee: Thejas M Nair
>             Fix For: 0.9.0
>
>         Attachments: PIG-1929.1.patch, PIG-1929.2.patch, PIG-1929.3.patch
>
>
> The following script should fail. However, it passed type checking, resulting a backend failure.
> A =LOAD 'x' USING PigStorage() AS ( Fint:int, Flong:long, Fdouble:double, Ffloat:float, Fchar:chararray, Fchararray:chararray, Fbytearray:bytearray, Fmap:map[], Fbag:BAG{ t:tuple( name, age, avg ) }, Ftuple:( name:chararray, age:int, avg:float) );
> B= FILTER A BY ( Ftuple gte ( 1, 2, 3 ));
> STORE B INTO 'y' USING PigStorage();

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (PIG-1929) Type checker failed to catch invalid type comparison

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

Thejas M Nair updated PIG-1929:
-------------------------------

    Attachment: PIG-1929.3.patch

PIG-1929.3.patch - Also casts bytearray objects to Tuple/Map in == and != operations.

> Type checker failed to catch invalid type comparison
> ----------------------------------------------------
>
>                 Key: PIG-1929
>                 URL: https://issues.apache.org/jira/browse/PIG-1929
>             Project: Pig
>          Issue Type: Bug
>            Reporter: Xuefu Zhang
>            Assignee: Thejas M Nair
>             Fix For: 0.9.0
>
>         Attachments: PIG-1929.1.patch, PIG-1929.2.patch, PIG-1929.3.patch
>
>
> The following script should fail. However, it passed type checking, resulting a backend failure.
> A =LOAD 'x' USING PigStorage() AS ( Fint:int, Flong:long, Fdouble:double, Ffloat:float, Fchar:chararray, Fchararray:chararray, Fbytearray:bytearray, Fmap:map[], Fbag:BAG{ t:tuple( name, age, avg ) }, Ftuple:( name:chararray, age:int, avg:float) );
> B= FILTER A BY ( Ftuple gte ( 1, 2, 3 ));
> STORE B INTO 'y' USING PigStorage();

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira