JanusGraph / JanusGraph/janusgraph

limit() is not restrictive enough when combined with V()

Open
#2,817 0 comments 0 reactions 0 assignees View on GitHub
kind/bug/possible
Dominant language
Java
Stars
5.8k
Forks
1.2k
Avg merge
13h 53m
Merged PRs (30d)
6

Description

- Version: 0.6.0 (and probably earlier)
- Storage Backend: any
- Mixed Index Backend: any

### Steps to reproduce
```groovy
g.addV().addV().addV().iterate()
```

### Expected Behavior (as produced by TinkerGraph)
```groovy
g.V().V().limit(1)
==>v[0]
g.V().V().limit(1).path()
==>path(v[0], v[0])
```
### Current Behavior:
```groovy
g.V().V().limit(1)
==>v[4152]
==>v[4152]
==>v[4152]
g.V().V().limit(1).path()
==>path(v[4152], v[4152])
==>path(v[4328], v[4152])
==>path(v[8424], v[4152])
```

Contributor guide

Open the contributing guide

Research direction

Start by running the supplied g.V().V().limit(1) and path() reproductions against JanusGraph and comparing them with the stated TinkerGraph results. Trace the query handling for limit() combined with repeated V() steps; done means limit(1) returns one vertex and one corresponding path as shown.

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.