You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by "Thejas M Nair (JIRA)" <ji...@apache.org> on 2011/03/22 19:50:05 UTC

[jira] [Resolved] (PIG-1922) null is being treated as string constant in expressions

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

Thejas M Nair resolved PIG-1922.
--------------------------------

    Resolution: Invalid

I agree with Alan's comment that is not a bug. This behavior is also documented in the section about nulls - http://pig.apache.org/docs/r0.8.0/piglatin_ref2.html#nulls

I also verified that the ==, != statements work as documented, except for one case which does not - "fil = filter by null == null;" . The filter expression should evaluate to not-true (null), but it evaluates to true. I will open another jira to track that issue.


> null is being treated as string constant in expressions
> -------------------------------------------------------
>
>                 Key: PIG-1922
>                 URL: https://issues.apache.org/jira/browse/PIG-1922
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: 0.8.0, 0.9.0
>            Reporter: Thejas M Nair
>             Fix For: 0.9.0
>
>
> In following statement, the null gets translated to string constant. The statement is invalid, and should result in an error. 
> {code}
> fil = filter l by a != null; -- This does not give an error, the correct usage is "a is not null"
> fil = filter l by a != adsf; -- this does give an error message saying that there is no column asdf
> {code}

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