cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Apoc.Coll.Sort() NullPointerException

Hi there

Using
Neo4j: 4.2.10
Apoc: apoc-4.2.0.6-all.jar
Browser 4.3.3

I got a NullPointerException from this query

WITH apoc.coll.dropDuplicateNeighbors([1,1,2,3,4,3,5]) AS numbers
WITH apoc.coll.pairs(numbers) AS pairs
UNWIND [pair IN pairs | apoc.coll.sort(pair)] AS pair
RETURN pair

Is my Cypher is bad or is it a bug?

1 ACCEPTED SOLUTION

I think I understood the issue, you cannot sort a list who has a null value in it and this Cypher generate a row with a null value in a list.

View solution in original post

1 REPLY 1

I think I understood the issue, you cannot sort a list who has a null value in it and this Cypher generate a row with a null value in a list.