JanusGraph / JanusGraph/janusgraph
Incorrectly comparing a counted value with predicate outside()
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 5.8k
- Forks
- 1.2k
- Avg merge
- 13h 53m
- Merged PRs (30d)
- 6
Description
Please include configurations and logs if available.
For confirmed bugs, please report:
- Version: 0.6.3
- Storage Backend: inmemory
- Mixed Index Backend:
- Link to discussed bug:
- Expected Behavior: I expect all vertices can be returned.
- Current Behavior: Only return one vertex.
- Steps to Reproduce:
I count the number of incoming edges of each vertex and filter vertices with a predicate outside(-1, -2). If a value is less than the first provided number (i.e., -1) or greater than the second (i.e., -2), outside(-1, -2) can filter it. Therefore, we expect all vertices can be returned because the number of their incoming edges should be greater than -2. However, only one vertex is returned.
gremlin> :> g.V().where(__.inE().count().is(outside(-1, -2)))
==>v[4312]
Stack Trace (if you have one)
Vertex bob = g.addV("person").property("name", "Bob").next(); // v[4312]
Vertex alice = g.addV("person").property("name", "Alice").next(); // v[4216]
Vertex book = g.addV("book").property("name", "book1").next(); // v[8312]
Edge edge1 = g.addE("knows").from(bob).to(alice).next();
Edge edge2 = g.addE("write").from(alice).to(book).next();
g.E(edge2).property("duration", new Float(0.94461)).iterate();
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the Gremlin query with the in-memory storage backend on JanusGraph 0.6.3, focusing on count().is(outside(-1, -2)). Trace how the counted value is compared with the outside predicate. Done means the query returns all expected vertices and a regression test covers this case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100