I might not understand how the data is different. If I MATCH and return A, I'm getting a new row for each node returned? And if I collect(A) I'm getting a single row of a collection of each node? So with the head() wouldn't I now have a single row with a single node and then additional rows with a single node as well? One row I imagine has two columns filled with a node each.
I don't suppose there is a visual graphic to represent the process/output? Is the WITH clause performed after all nodes for the MATCH are found or with every MATCH found as it is found? On Monday, 3 February 2014 00:16:53 UTC+13, Michael Hunger wrote: > > Imagine you have a set of data you iterate over and > For each row you want to return the row value and an aggregate expression > (collect) across all rows > > > > Sent from mobile device > > Am 02.02.2014 um 12:07 schrieb Brennan Kinney > <[email protected]<javascript:> > >: > > Just making sure if it's a bug, I'm still new to Neo4j and Cypher, figure > there is a chance I might misunderstand how to do something. The terms > scalar and aggregate are new to me for example. The query you provided > works fine with no bug, I still don't understand why I could return A or > return B (by omitting A from WITH & RETURN clauses) but not both with my > query. I'll report to GH. > > On Sunday, 2 February 2014 19:24:00 UTC+13, Michael Hunger wrote: >> >> So it's actually a bug that it doesn't fail correctly. Please report >> it as GH issue. >> >> On Sun, Feb 2, 2014 at 7:22 AM, Michael Hunger >> <[email protected]> wrote: >> > You cannot return the scalar values and the aggregate of the same >> > values at the same time. >> > You have to match again. >> > >> > But it shouldn't eat your CPU but just fail correctly with an error. >> > How many nodes do you have in your db? >> > >> > MATCH (A) >> > WITH head(collect(A)) as B >> > MATCH (A) >> > RETURN A, B >> > >> > >> > On Sun, Feb 2, 2014 at 4:27 AM, Brennan Kinney >> > <[email protected]> wrote: >> >> Windows 7 x64 accessing Neo4j via Chrome using localhost:7474/browser >> . >> >> Neo4j version 2.0, have replicated issue with GrapheneDB Neo4j 2.0 via >> Neo4j >> >> Browser. Doubt it has anything to do with my hardware. >> >> >> >> -- >> >> You received this message because you are subscribed to the Google >> Groups >> >> "Neo4j" group. >> >> To unsubscribe from this group and stop receiving emails from it, send >> an >> >> email to [email protected]. >> >> For more options, visit https://groups.google.com/groups/opt_out. >> > -- > You received this message because you are subscribed to the Google Groups > "Neo4j" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected] <javascript:>. > For more options, visit https://groups.google.com/groups/opt_out. > > -- You received this message because you are subscribed to the Google Groups "Neo4j" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
