[Bug] Inconsistent behavior when comparing a counted value with a negative value
- Dominant language
- Java
- Stars
- 3.2k
- Forks
- 636
- Avg merge
- 3d 11h
- Merged PRs (30d)
- 14
Description
### Bug Type (问题类型)
gremlin (结果不合预期)
### Before submit
- [X] 我已经确认现有的 [Issues](https://github.com/hugegraph/hugegraph/issues) 与 [FAQ](https://hugegraph.github.io/hugegraph-doc/guides/faq.html) 中没有相同 / 重复问题
### Environment (环境信息)
- Server Version: v1.0.0
- Backend: in memory
- OS: xx CPUs, xx G RAM, Centos 7.x
- Data Size: xx vertices, xx edges
### 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_
Contributor guide
Assessment
This issue has not been assessed yet.