Skip to content

Commit

Permalink
Added test to be sure that we handle aggregating on functions
Browse files Browse the repository at this point in the history
  • Loading branch information
systay committed Nov 14, 2011
1 parent 3047b05 commit 2dd5bc4
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions cypher/src/test/scala/org/neo4j/cypher/ExecutionEngineTest.scala
Expand Up @@ -1127,6 +1127,22 @@ order by a.name
assert(List(a,b,c) === result.columnAs[Node]("a") .toList)
}

@Test def shouldHandleAggregationOnFunctions() {
val a = createNode("A")
val b = createNode("B")
val c = createNode("C")
relate(a,b,"X")
relate(a,c,"X")

val result = parseAndExecute("""
start a = node(1)
match p = a -[*]-> b
return b, avg(length(p))
""")

assert(List(b,c) === result.columnAs[Node]("b") .toList)
}


@Test(expected = classOf[SyntaxException]) def shouldNotSupportSortingOnThingsAfterDistinctHasRemovedIt() {
val a = createNode("name"->"A", "age"->13)
Expand Down

0 comments on commit 2dd5bc4

Please sign in to comment.