Incorrect handling of order().by().not()
- 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: v0.12.0
- Backend: in-memory
- OS: Centos
- Data Size: xx vertices, xx edges
### Expected & Actual behavior (期望与实际表现)
```
Vertex v1 = new Vertex("vl").property("vp0", 1);
Vertex v2 = new Vertex("vl").property("vp1", 2);
```
We create two vertices `v1` and `v2`. We first sort these vertices with `order().by('vp0')`, and then filter vertices with `not(tail(1))`.
```
g.V().order().by('vp0').not(tail(1))
==> {}
g.V().order().by('vp0').barrier().not(tail(1))
==> {The property does not exist as the key has no associated value for the provided element: v[683774666262708224]:vp0}
g.V().order().by('vp0').tail(1))
==> {The property does not exist as the key has no associated value for the provided element: v[683774666262708224]:vp0}
```
We expect the first query to throw an exception, which is the same to the exception thrown by the second and the third query. However, HugeGraph cannot correctly throw exception when we execute the first query.
### Vertex/Edge example (问题点 / 边数据举例)
_No response_
### Schema [VertexLabel, EdgeLabel, IndexLabel] (元数据结构)
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.