Using
Neo4j 4.0.3
APOC apoc-4.0.0.17-all.jar
Neo4j Browser version: 4.0.5
As part of an analysis process I get 5 (dirty) collections mixed with numbers, text ans NULLs. I'd like to find the maximum number over all 5 collections. Therefore I did something like
<RETURN apoc.coll.max([0]++[1,2,3,4,5,6]+[7,0]+["ABC"]+) > ==> 7 (fine)
Unfortunately some of the collections have NULL values
<return apoc.coll.max([NULL]+[NULL]+[NULL]+[0,1,2]) > ==> 2 (fine)
<return apoc.coll.max([0,1,2]+[NULL])> ==> 2 (fine)
But
<return apoc.coll.max([NULL]+[NULL]+[NULL]+[0,1,2]+[NULL]) > ==> NULL
afterwords executing again
<return apoc.coll.max([0,1,2]) > ==> NULL
The only chance to get rid of this NULL is to restart the database
Additional to this:
<apoc.coll.max([""]++[1,2,3,4,5,6]+[7,0]+["ABC"]+)> ==> "ABC"
I would like to have the control, that the apoc.coll.max evaluates only numeric values and not occasionally text.