apache / apache/hugegraph

Error occurred when querying properties using where() if the data has INFINITY

Open
#2,189 2 comments 0 reactions 0 assignees View on GitHub
bug
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/apache/hugegraph/issues) 与 [FAQ](https://hugegraph.apache.org/docs/guides/faq/) 中没有相同 / 重复问题 (I have confirmed and searched that there are no similar problems in the historical issue and documents)

### Environment (环境信息)

- Server Version: 1.0.0 (Apache Release Version)
- Backend: RocksDB x nodes, HDD or SSD
- OS: xx CPUs, xx G RAM, Ubuntu 2x.x / CentOS 7.x
- Data Size: xx vertices, xx edges

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

I create two vertices.
```
Vertex product1 = new Vertex("product").property("name", "product1").property("price", 3.254615);
Vertex product2 = new Vertex("product").property("name", "product2").property("price", new Double(1029.98 / 0));
```
When I query property `price` using `where()`, it throws an exception, while I can query the correct result using `has()`.
```
gremlin> :> hugegraph.traversal().V().where(values('price').is(eq(3.254615)))
java.lang.NumberFormatException

gremlin> :> hugegraph.traversal().V().has('price',3.254615)
==>[id:707955786323591168,label:product,type:vertex,properties:[name:product1,price:3.254615]]
```

When I drop vertex `product2`, I can get the correct result.
```
gremlin> :> hugegraph.traversal().V(707955786323591169).drop()

gremlin> :> hugegraph.traversal().V().where(values('price').is(eq(3.254615)))
==>[id:707955786323591168,label:product,type:vertex,properties:[name:product1,price:3.254615]]
```

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

_No response_

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

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.