bitnine-oss / agensgraph

AgensGraph, a transactional graph database based on PostgreSQL
http://www.agensgraph.org
Other
1.32k stars 146 forks source link

Bug that occur when comparing different types of values #646

Open w158937299 opened 5 months ago

w158937299 commented 5 months ago

Agensgraph version: 2.13.0 Operating system: (Windows 11) API/Driver: (psycopg2 2.9.7) Steps to reproduce 5

As shown in this picture, query 1 returns the names of all nodes with the property "p2" greater than 50. Neo4j returns an empty set, while Agensgraph returns the names of some nodes. Query 2 returns the names and "p2" property values of all nodes. We can see that the type of the "p2" property value is a boolean constant, and it cannot be compared with an integer constant. However, Agensgraph still returns results. Therefore, we suspect that Agensgraph may have a bug in setting the priority of boolean constant higher than integer constants when comparing values of different types.

w158937299 commented 5 months ago

HI @yjy44 , could you please check on this?