Re: [Neo4j] Paths with null?

2011-11-15 Thread Alistair Jones
Reminds me of:
http://qconlondon.com/london-2009/presentation/Null+References:+The+Billion+Dollar+Mistake

On 15 November 2011 08:15, Peter Neubauer
wrote:

> The void is spreading. Beware.
>
> Cheers,
>
> /peter neubauer
>
> GTalk:  neubauer.peter
> Skype   peter.neubauer
> Phone   +46 704 106975
> LinkedIn   http://www.linkedin.com/in/neubauer
> Twitter  http://twitter.com/peterneubauer
>
> http://www.neo4j.org  - NOSQL for the Enterprise.
> http://startupbootcamp.org/- Öresund - Innovation happens HERE.
>
>
> On Tue, Nov 15, 2011 at 8:50 AM, Mattias Persson
> wrote:
>
> > That may be a good solution, because you could not treat such a path (if
> it
> > were to have null in it somewhere) in a normal fashion anyway.
> >
> > 2011/11/15 Andres Taylor 
> >
> > > I just realized the obviousness of the truth.
> > >
> > > The optional bit is viral - it spreads out if it can. So, a path
> pointing
> > > to an optional relationship, is it self optional. Just like nodes
> hanging
> > > from an optional relationship are also optional.
> > > So, if the path happens to have any null parts, the whole path is null.
> > >
> > > Makes sense?
> > >
> > > Andrés
> > >
> > > On Sun, Nov 13, 2011 at 1:11 PM, Mattias Persson
> > > wrote:
> > >
> > > > A Path with null in it doesn't make much sense to me. I'd prefer b)
> > also.
> > > >
> > > > Den lördagen den 12:e november 2011 skrev Andres Taylor<
> > > > andres.tay...@neotechnology.com>:
> > > > > On Sat, Nov 12, 2011 at 3:02 PM, D. Frej 
> > wrote:
> > > > >
> > > > >> to understand the question correctly: is it something like
> > > > >> (a)-[:REL_TYPE*0..1]->(b)
> > > > >>
> > > > >
> > > > > Sorry for not being clearer...
> > > > >
> > > > > No, that pattern is safe - it will never contain a null. The
> optional
> > > > > relationships have a question mark in them, like this:
> > > > >
> > > > >  (a)-[?:REL_TYPE]->(b)
> > > > >
> > > > > Andrés
> > > > > ___
> > > > > Neo4j mailing list
> > > > > User@lists.neo4j.org
> > > > > https://lists.neo4j.org/mailman/listinfo/user
> > > > >
> > > >
> > > > --
> > > > Mattias Persson, [matt...@neotechnology.com]
> > > > Hacker, Neo Technology
> > > > www.neotechnology.com
> > > > ___
> > > > Neo4j mailing list
> > > > User@lists.neo4j.org
> > > > https://lists.neo4j.org/mailman/listinfo/user
> > > >
> > > ___
> > > Neo4j mailing list
> > > User@lists.neo4j.org
> > > https://lists.neo4j.org/mailman/listinfo/user
> > >
> >
> >
> >
> > --
> > Mattias Persson, [matt...@neotechnology.com]
> > Hacker, Neo Technology
> > www.neotechnology.com
> > ___
> > Neo4j mailing list
> > User@lists.neo4j.org
> > https://lists.neo4j.org/mailman/listinfo/user
> >
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Paths with null?

2011-11-15 Thread Peter Neubauer
The void is spreading. Beware.

Cheers,

/peter neubauer

GTalk:  neubauer.peter
Skype   peter.neubauer
Phone   +46 704 106975
LinkedIn   http://www.linkedin.com/in/neubauer
Twitter  http://twitter.com/peterneubauer

http://www.neo4j.org  - NOSQL for the Enterprise.
http://startupbootcamp.org/- Öresund - Innovation happens HERE.


On Tue, Nov 15, 2011 at 8:50 AM, Mattias Persson
wrote:

> That may be a good solution, because you could not treat such a path (if it
> were to have null in it somewhere) in a normal fashion anyway.
>
> 2011/11/15 Andres Taylor 
>
> > I just realized the obviousness of the truth.
> >
> > The optional bit is viral - it spreads out if it can. So, a path pointing
> > to an optional relationship, is it self optional. Just like nodes hanging
> > from an optional relationship are also optional.
> > So, if the path happens to have any null parts, the whole path is null.
> >
> > Makes sense?
> >
> > Andrés
> >
> > On Sun, Nov 13, 2011 at 1:11 PM, Mattias Persson
> > wrote:
> >
> > > A Path with null in it doesn't make much sense to me. I'd prefer b)
> also.
> > >
> > > Den lördagen den 12:e november 2011 skrev Andres Taylor<
> > > andres.tay...@neotechnology.com>:
> > > > On Sat, Nov 12, 2011 at 3:02 PM, D. Frej 
> wrote:
> > > >
> > > >> to understand the question correctly: is it something like
> > > >> (a)-[:REL_TYPE*0..1]->(b)
> > > >>
> > > >
> > > > Sorry for not being clearer...
> > > >
> > > > No, that pattern is safe - it will never contain a null. The optional
> > > > relationships have a question mark in them, like this:
> > > >
> > > >  (a)-[?:REL_TYPE]->(b)
> > > >
> > > > Andrés
> > > > ___
> > > > Neo4j mailing list
> > > > User@lists.neo4j.org
> > > > https://lists.neo4j.org/mailman/listinfo/user
> > > >
> > >
> > > --
> > > Mattias Persson, [matt...@neotechnology.com]
> > > Hacker, Neo Technology
> > > www.neotechnology.com
> > > ___
> > > Neo4j mailing list
> > > User@lists.neo4j.org
> > > https://lists.neo4j.org/mailman/listinfo/user
> > >
> > ___
> > Neo4j mailing list
> > User@lists.neo4j.org
> > https://lists.neo4j.org/mailman/listinfo/user
> >
>
>
>
> --
> Mattias Persson, [matt...@neotechnology.com]
> Hacker, Neo Technology
> www.neotechnology.com
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Paths with null?

2011-11-14 Thread Mattias Persson
That may be a good solution, because you could not treat such a path (if it
were to have null in it somewhere) in a normal fashion anyway.

2011/11/15 Andres Taylor 

> I just realized the obviousness of the truth.
>
> The optional bit is viral - it spreads out if it can. So, a path pointing
> to an optional relationship, is it self optional. Just like nodes hanging
> from an optional relationship are also optional.
> So, if the path happens to have any null parts, the whole path is null.
>
> Makes sense?
>
> Andrés
>
> On Sun, Nov 13, 2011 at 1:11 PM, Mattias Persson
> wrote:
>
> > A Path with null in it doesn't make much sense to me. I'd prefer b) also.
> >
> > Den lördagen den 12:e november 2011 skrev Andres Taylor<
> > andres.tay...@neotechnology.com>:
> > > On Sat, Nov 12, 2011 at 3:02 PM, D. Frej  wrote:
> > >
> > >> to understand the question correctly: is it something like
> > >> (a)-[:REL_TYPE*0..1]->(b)
> > >>
> > >
> > > Sorry for not being clearer...
> > >
> > > No, that pattern is safe - it will never contain a null. The optional
> > > relationships have a question mark in them, like this:
> > >
> > >  (a)-[?:REL_TYPE]->(b)
> > >
> > > Andrés
> > > ___
> > > Neo4j mailing list
> > > User@lists.neo4j.org
> > > https://lists.neo4j.org/mailman/listinfo/user
> > >
> >
> > --
> > Mattias Persson, [matt...@neotechnology.com]
> > Hacker, Neo Technology
> > www.neotechnology.com
> > ___
> > Neo4j mailing list
> > User@lists.neo4j.org
> > https://lists.neo4j.org/mailman/listinfo/user
> >
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>



-- 
Mattias Persson, [matt...@neotechnology.com]
Hacker, Neo Technology
www.neotechnology.com
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Paths with null?

2011-11-14 Thread Andres Taylor
I just realized the obviousness of the truth.

The optional bit is viral - it spreads out if it can. So, a path pointing
to an optional relationship, is it self optional. Just like nodes hanging
from an optional relationship are also optional.
So, if the path happens to have any null parts, the whole path is null.

Makes sense?

Andrés

On Sun, Nov 13, 2011 at 1:11 PM, Mattias Persson
wrote:

> A Path with null in it doesn't make much sense to me. I'd prefer b) also.
>
> Den lördagen den 12:e november 2011 skrev Andres Taylor<
> andres.tay...@neotechnology.com>:
> > On Sat, Nov 12, 2011 at 3:02 PM, D. Frej  wrote:
> >
> >> to understand the question correctly: is it something like
> >> (a)-[:REL_TYPE*0..1]->(b)
> >>
> >
> > Sorry for not being clearer...
> >
> > No, that pattern is safe - it will never contain a null. The optional
> > relationships have a question mark in them, like this:
> >
> >  (a)-[?:REL_TYPE]->(b)
> >
> > Andrés
> > ___
> > Neo4j mailing list
> > User@lists.neo4j.org
> > https://lists.neo4j.org/mailman/listinfo/user
> >
>
> --
> Mattias Persson, [matt...@neotechnology.com]
> Hacker, Neo Technology
> www.neotechnology.com
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


[Neo4j] Paths with null?

2011-11-13 Thread Mattias Persson
A Path with null in it doesn't make much sense to me. I'd prefer b) also.

Den lördagen den 12:e november 2011 skrev Andres Taylor<
andres.tay...@neotechnology.com>:
> On Sat, Nov 12, 2011 at 3:02 PM, D. Frej  wrote:
>
>> to understand the question correctly: is it something like
>> (a)-[:REL_TYPE*0..1]->(b)
>>
>
> Sorry for not being clearer...
>
> No, that pattern is safe - it will never contain a null. The optional
> relationships have a question mark in them, like this:
>
>  (a)-[?:REL_TYPE]->(b)
>
> Andrés
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>

-- 
Mattias Persson, [matt...@neotechnology.com]
Hacker, Neo Technology
www.neotechnology.com
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Paths with null?

2011-11-12 Thread Andres Taylor
On Sat, Nov 12, 2011 at 3:02 PM, D. Frej  wrote:

> to understand the question correctly: is it something like
> (a)-[:REL_TYPE*0..1]->(b)
>

Sorry for not being clearer...

No, that pattern is safe - it will never contain a null. The optional
relationships have a question mark in them, like this:

 (a)-[?:REL_TYPE]->(b)

Andrés
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Paths with null?

2011-11-12 Thread D. Frej
to understand the question correctly: is it something like
(a)-[:REL_TYPE*0..1]->(b)
?



Am 12.11.2011 14:40, schrieb Andres Taylor:
> Hey guys,
>
> We have an issue  on Github
> that's nagging me. In Cypher, you can declare a path by assigning it to an
> identifier, like so:
>
> MATCH p = a-->b
>
> The issue we have is that when the relationship between a and b are
> optional, we might end up with a path that contains at least one null. Now,
> my question is:
>
> a) Should Cypher allow paths (org.neo4j.graphdb.Path) with null in them?
>
> or
>
> b) Should Cypher just not allow you to have optional relationships assigned
> to paths?
>
> WDYT?
>
> Personally, I'm leaning towards b. I don't see an use case that would be
> helped by a, and a introduces problems that I'd like to avoid.
>
> Andrés
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>

___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


[Neo4j] Paths with null?

2011-11-12 Thread Andres Taylor
Hey guys,

We have an issue  on Github
that's nagging me. In Cypher, you can declare a path by assigning it to an
identifier, like so:

MATCH p = a-->b

The issue we have is that when the relationship between a and b are
optional, we might end up with a path that contains at least one null. Now,
my question is:

a) Should Cypher allow paths (org.neo4j.graphdb.Path) with null in them?

or

b) Should Cypher just not allow you to have optional relationships assigned
to paths?

WDYT?

Personally, I'm leaning towards b. I don't see an use case that would be
helped by a, and a introduces problems that I'd like to avoid.

Andrés
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user