JanusGraph / JanusGraph/janusgraph
match()-step returns false results
- Dominant language
- Java
- Stars
- 5.8k
- Forks
- 1.2k
- Avg merge
- 13h 53m
- Merged PRs (30d)
- 6
Description
- Version: 1.1.0
- Storage Backend: inmemory
- Mixed Index Backend: none
- Link to discussed bug:
- Expected Behavior:
When i execute ```g.V().order().by(asc).has('vp3',0.62307286)``` and ```g.V().order().by(asc).match(__.as('start0').has('vp3',0.62307286).as('m0')).select('m0')```. Both queries need returns the same results.
When i execute both queries on **HugeGraph**, they return same results and met the expectations.
- Current Behavior:
The first query returns: ```result{object=v[32896] class=org.apache.tinkerpop.gremlin.structure.util.detached.DetachedVertex}```
The second query returns: empty results.
- Steps to Reproduce:
1. connect to a empty graph
2. Insert the target node into the graph and execute two queries above
```
GraphTraversalSource g = test.getG();
g.E().drop().iterate();
g.V().drop().iterate();
g.addV().property("vp3", 0.62307286).next();
String query1 = "g.V().has('vp3',0.62307286).count()";
String query2 = "g.V().order().by(asc).match(__.as('start0').has('vp3',0.62307286).as('m0')).select('m0')" ;
try{
List results = test.getClient().submit(query1).all().get();
for (Result r : results) {
System.out.println(r);
}
System.out.println("=============");
List results1 = test.getClient().submit(query2).all().get();
for (Result r : results1) {
System.out.println(r);
}
}catch (Exception e){
e.printStackTrace();
}
```
3. The first query returns ```result{object=v[32896] class=org.apache.tinkerpop.gremlin.structure.util.detached.DetachedVertex}```, the second returns empty results.
Contributor guide
Research direction
Start by running the Java reproduction with test.getG() and test.getClient(), comparing the direct has() query with the match() and select() query. Trace the match-step handling for the provided vp3 value and verify the fix by confirming both queries return the inserted vertex.
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