apache / incubator-hugegraph

A graph database that supports more than 100+ billion data, high performance and scalability (Include OLTP Engine & REST-API & Backends)
https://hugegraph.apache.org
Apache License 2.0
2.63k stars 517 forks source link

[Bug] Inconsistent behavior when comparing a counted value with a negative value #2133

Open zhengyingying opened 1 year ago

zhengyingying commented 1 year ago

Bug Type (问题类型)

gremlin (结果不合预期)

Before submit

Environment (环境信息)

Expected & Actual behavior (期望与实际表现)

When I compare a counted number with a negative value that is less than -2, an exception (e.g., Not a legal range: [0, -2]) is thrown. However, a negative value -1 or-2 cannot trigger this exception.

gremlin> :> hugegraph.traversal().V().where(__.in().count().is(eq(-3)))
Not a legal range: [0, -2]

gremlin> :> hugegraph.traversal().V().where(__.in().count().is(eq(-2)))
gremlin> :> hugegraph.traversal().V().where(__.in().count().is(eq(-1)))

Vertex/Edge example (问题点 / 边数据举例)

No response

Schema [VertexLabel, EdgeLabel, IndexLabel] (元数据结构)

No response

javeme commented 1 year ago

looks like an interesting bug