apache / apache/hugegraph

Exception can not be triggered correctly

Open
#1,967 2 comments 0 reactions 0 assignees View on GitHub
bug gremlin improvement
Dominant language
Java
Stars
3.2k
Forks
636
Avg merge
3d 11h
Merged PRs (30d)
14

Description

### Bug Type (问题类型)

_No response_

### Before submit

- [X] 我已经确认现有的 [Issues](https://github.com/hugegraph/hugegraph/issues) 与 [FAQ](https://hugegraph.github.io/hugegraph-doc/guides/faq.html) 中没有相同 / 重复问题

### Environment (环境信息)

- Server Version: v0.12.0
- Backend: inmemory
- OS: xx CPUs, xx G RAM, Centos 7.x
- Data Size: xx vertices, xx edges

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

```
schema.propertyKey("vp0").asBoolean().ifNotExist().create();
schema.vertexLabel("vl0").properties("vp0").nullableKeys("vp0").create();
schema.indexLabel("index").onV("vl0").by("vp0").shard().ifNotExist().create();

Vertex v0 = new Vertex("vl0").property("vp0", true); // id: 636937711923494912
```

We noticed that Hugegraph does not support `inside()` operation with arguments of boolean or string types. When we query `g.V().has('vl0', 'vp0', inside(true,true))`, the expected exception `Can't compare between 7 > true and 7 < true` was thrown. However, when we query with the vertex id, i.e., `g.V(636937711923494912).has('vl0', 'vp0', inside(true,true))`, the exception was not triggered.

### 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.