neo4j-contrib / neo4j-graph-algorithms

Efficient Graph Algorithms for Neo4j
https://github.com/neo4j/graph-data-science/
GNU General Public License v3.0
767 stars 196 forks source link

min() is broken.. #902

Closed bsquire0128 closed 5 years ago

bsquire0128 commented 5 years ago

In some cases min always returns first position. This is especially problematic with instances where you want the min between two nodes such as the last example.

Doesn't work

return min(6,4) 6

Works

return min(6.0,4.0) 4.0

Doesn't work

UNWIND [6,4] as val RETURN min(val) 4

Doesn't work

Match (c1:Collision)-->(c2:Collision) where id(c1) < id(c2) return id(c1),id(c2), min(id(c2),id(c1)) as min limit 10

bsquire0128 commented 5 years ago

Moved to Neo4j issues side