4
votes

What's wrong with the following query? [Neo4j 1.8.2, Embedded]

start merchant = node:merchants('id:10')
match (merchant)<-[:VALID_AT]-(offer)-[:TARGET_PINCODE]->(pincode)<-[:RESIDES_IN]-(customer) where (offer)-[:VALID_OFFER]->() and offer.endDate > 1
return count(offer)

Webadmin returns undefined

Java Exception:

org.neo4j.helpers.ThisShouldNotHappenError: Developer: Andres claims that: This execution plan should not exist. at org.neo4j.cypher.internal.commands.PathExpression$$anonfun$4.apply(PathExpression.scala:47) at org.neo4j.cypher.internal.commands.PathExpression$$anonfun$4.apply(PathExpression.scala:46) at scala.collection.LinearSeqOptimized$class.exists(LinearSeqOptimized.scala:79) at scala.collection.immutable.List.exists(List.scala:45) at org.neo4j.cypher.internal.commands.PathExpression.apply(PathExpression.scala:46) at org.neo4j.cypher.internal.commands.PathExpression.apply(PathExpression.scala:31) at org.neo4j.cypher.internal.commands.NonEmpty.isMatch(Predicate.scala:283) at org.neo4j.cypher.internal.commands.And.isMatch(Predicate.scala:83) at org.neo4j.cypher.internal.pipes.matching.FilteringIterable$FilteringIterator.spoolToNextInLine(FilteringIterable.scala:55) at org.neo4j.cypher.internal.pipes.matching.FilteringIterable$FilteringIterator.(FilteringIterable.scala:34) at org.neo4j.cypher.internal.pipes.matching.FilteringIterable.iterator(FilteringIterable.scala:72) at org.neo4j.cypher.internal.pipes.matching.FilteringIterable.iterator(FilteringIterable.scala:27) at scala.collection.JavaConversions$IterableWrapperTrait$class.iterator(JavaConversions.scala:557) at scala.collection.JavaConversions$IterableWrapper.iterator(JavaConversions.scala:583) at scala.collection.JavaConversions$IterableWrapper.iterator(JavaConversions.scala:583) at org.neo4j.kernel.impl.traversal.TraversalBranchWithState.expandRelationshipsWithoutChecks(TraversalBranchWithState.java:70) at org.neo4j.kernel.impl.traversal.TraversalBranchImpl.expandRelationships(TraversalBranchImpl.java:104) at org.neo4j.kernel.impl.traversal.StartNodeTraversalBranch.next(StartNodeTraversalBranch.java:47) at org.neo4j.kernel.impl.traversal.AsOneStartBranch.next(AsOneStartBranch.java:100) at org.neo4j.kernel.PreorderDepthFirstSelector.next(PreorderDepthFirstSelector.java:52) at org.neo4j.kernel.impl.traversal.TraverserIterator.fetchNextOrNull(TraverserIterator.java:65) at org.neo4j.kernel.impl.traversal.TraverserIterator.fetchNextOrNull(TraverserIterator.java:34) at org.neo4j.helpers.collection.PrefetchingIterator.hasNext(PrefetchingIterator.java:55) at scala.collection.JavaConversions$JIteratorWrapper.hasNext(JavaConversions.scala:574) at scala.collection.Iterator$$anon$21.hasNext(Iterator.scala:371) at scala.collection.Iterator$$anon$21.hasNext(Iterator.scala:371) at scala.collection.Iterator$$anon$22.hasNext(Iterator.scala:388) at scala.collection.Iterator$class.foreach(Iterator.scala:660) at scala.collection.Iterator$$anon$22.foreach(Iterator.scala:382) at org.neo4j.cypher.internal.pipes.EagerAggregationPipe.createResults(EagerAggregationPipe.scala:76) at org.neo4j.cypher.internal.pipes.ColumnFilterPipe.createResults(ColumnFilterPipe.scala:37) at org.neo4j.cypher.internal.executionplan.ExecutionPlanImpl$$anonfun$6.apply(ExecutionPlanImpl.scala:127) at org.neo4j.cypher.internal.executionplan.ExecutionPlanImpl$$anonfun$6.apply(ExecutionPlanImpl.scala:125) at org.neo4j.cypher.internal.executionplan.ExecutionPlanImpl.execute(ExecutionPlanImpl.scala:33) at org.neo4j.cypher.ExecutionEngine.execute(ExecutionEngine.scala:59) at org.neo4j.cypher.ExecutionEngine.execute(ExecutionEngine.scala:63) at org.neo4j.cypher.javacompat.ExecutionEngine.execute(ExecutionEngine.java:79)

Note: return offer instead of return count(offer) works

1
I wish I could upvote this moreKyeotic
99% sure this was fixed in 1.9. :(Eve Freeman
:-( Wes, I'm sure you'd have mentioned it but is there any sort of workaround? This is the smallest part of a larger query so counting the offers in code won't work very wellLuanne

1 Answers

0
votes

Upgraded to Neo4j 1.9 RC1 and the problem no longer exists