|
|
-
CONCAT(null, "something") == NULL ?
Yang 2012-11-02, 22:09
looks a more intuitive result should be "something" , right?
but on my system it gave null
-
Re: CONCAT(null, "something") == NULL ?
Alan Gates 2012-11-02, 22:33
To give some context, the null semantics in Pig follow SQL's. In SQL, null is viral, so any operation with null results in null. The idea is that null means unknown, not empty. So concat('x', unknown) = unknown.
Alan.
On Nov 2, 2012, at 3:09 PM, Yang wrote:
> looks a more intuitive result should be "something" , right? > > but on my system it gave null
+
Alan Gates 2012-11-02, 22:33
-
Re: CONCAT(null, "something") == NULL ?
Cheolsoo Park 2012-11-02, 22:40
Hi Alan, Recently, I have seen several similar confusions about nulls in Pig. For example, here is another discussion: https://issues.apache.org/jira/browse/PIG-3021. We are documenting them, but apparently, many users find it confusing. I am wondering if there is anything that we can do better. Thanks, Cheolsoo On Fri, Nov 2, 2012 at 3:33 PM, Alan Gates <[EMAIL PROTECTED]> wrote: > To give some context, the null semantics in Pig follow SQL's. In SQL, > null is viral, so any operation with null results in null. The idea is > that null means unknown, not empty. So concat('x', unknown) = unknown. > > Alan. > > On Nov 2, 2012, at 3:09 PM, Yang wrote: > > > looks a more intuitive result should be "something" , right? > > > > but on my system it gave null > >
+
Cheolsoo Park 2012-11-02, 22:40
-
Re: CONCAT(null, "something") == NULL ?
Yang 2012-11-05, 17:15
thanks guys, now I see that returning NULL makes sense On Fri, Nov 2, 2012 at 3:40 PM, Cheolsoo Park <[EMAIL PROTECTED]> wrote: > Hi Alan, > > Recently, I have seen several similar confusions about nulls in Pig. For > example, here is another discussion: > https://issues.apache.org/jira/browse/PIG-3021. > > We are documenting them, but apparently, many users find it confusing. I am > wondering if there is anything that we can do better. > > Thanks, > Cheolsoo > > On Fri, Nov 2, 2012 at 3:33 PM, Alan Gates <[EMAIL PROTECTED]> wrote: > > > To give some context, the null semantics in Pig follow SQL's. In SQL, > > null is viral, so any operation with null results in null. The idea is > > that null means unknown, not empty. So concat('x', unknown) = unknown. > > > > Alan. > > > > On Nov 2, 2012, at 3:09 PM, Yang wrote: > > > > > looks a more intuitive result should be "something" , right? > > > > > > but on my system it gave null > > > > >
-
Re: CONCAT(null, "something") == NULL ?
Alan Gates 2012-11-05, 16:16
Better in terms of semantics or terms of documentation? We can't change the semantics of null in Pig; it's been that way the whole time. Plus this concept of unknown data is important in data processing. If we had it to do over again we could name it 'unknown' instead of null, but it seems late for that now. Alan. On Nov 2, 2012, at 3:40 PM, Cheolsoo Park wrote: > Hi Alan, > > Recently, I have seen several similar confusions about nulls in Pig. For > example, here is another discussion: > https://issues.apache.org/jira/browse/PIG-3021. > > We are documenting them, but apparently, many users find it confusing. I am > wondering if there is anything that we can do better. > > Thanks, > Cheolsoo > > On Fri, Nov 2, 2012 at 3:33 PM, Alan Gates <[EMAIL PROTECTED]> wrote: > >> To give some context, the null semantics in Pig follow SQL's. In SQL, >> null is viral, so any operation with null results in null. The idea is >> that null means unknown, not empty. So concat('x', unknown) = unknown. >> >> Alan. >> >> On Nov 2, 2012, at 3:09 PM, Yang wrote: >> >>> looks a more intuitive result should be "something" , right? >>> >>> but on my system it gave null >> >>
+
Alan Gates 2012-11-05, 16:16
-
Re: CONCAT(null, "something") == NULL ?
Jonathan Coveney 2012-11-05, 18:01
I agree with Alan on all counts. I think the confusing part is that null is overloaded. Alas. 2012/11/5 Alan Gates <[EMAIL PROTECTED]> > Better in terms of semantics or terms of documentation? We can't change > the semantics of null in Pig; it's been that way the whole time. Plus this > concept of unknown data is important in data processing. If we had it to > do over again we could name it 'unknown' instead of null, but it seems late > for that now. > > Alan. > > On Nov 2, 2012, at 3:40 PM, Cheolsoo Park wrote: > > > Hi Alan, > > > > Recently, I have seen several similar confusions about nulls in Pig. For > > example, here is another discussion: > > https://issues.apache.org/jira/browse/PIG-3021. > > > > We are documenting them, but apparently, many users find it confusing. I > am > > wondering if there is anything that we can do better. > > > > Thanks, > > Cheolsoo > > > > On Fri, Nov 2, 2012 at 3:33 PM, Alan Gates <[EMAIL PROTECTED]> > wrote: > > > >> To give some context, the null semantics in Pig follow SQL's. In SQL, > >> null is viral, so any operation with null results in null. The idea is > >> that null means unknown, not empty. So concat('x', unknown) = unknown. > >> > >> Alan. > >> > >> On Nov 2, 2012, at 3:09 PM, Yang wrote: > >> > >>> looks a more intuitive result should be "something" , right? > >>> > >>> but on my system it gave null > >> > >> > >
+
Jonathan Coveney 2012-11-05, 18:01
-
Re: CONCAT(null, "something") == NULL ?
Cheolsoo Park 2012-11-02, 22:14
Hi, You're not the only one who finds it not intuitive. Please see: https://issues.apache.org/jira/browse/PIG-2929. Thanks, Cheolsoo On Fri, Nov 2, 2012 at 3:09 PM, Yang <[EMAIL PROTECTED]> wrote: > looks a more intuitive result should be "something" , right? > > but on my system it gave null >
+
Cheolsoo Park 2012-11-02, 22:14
|
|