Description
my environment running ArangoDB
I'm using the latest ArangoDB of the respective release series:
- 2.8
- 3.0
- 3.1
- 3.2
- self-compiled devel branch
Mode:
- Cluster
- Single-Server
Storage-Engine:
- mmfiles
- rocksdb
On this operating system:
- DCOS on
- AWS
- Azure
- own infrastructure
- Linux
- Debian .deb
- Ubuntu .deb
- SUSE .rpm
- RedHat .rpm
- Fedora .rpm
- Gentoo
- docker - official docker library
- other:
- Windows, version:
- MacOS, version: Sierra, 10.12.6
this is an AQL-related issue:
[x] I'm using graph features
I'm issuing AQL via:
- web interface with this browser: Chrome Version 61.0.3163.100 (Official Build) (64-bit) running on this OS: MacOS, version: Sierra, 10.12.6
- arangosh
- this Driver: arangodb/go-driver
I've run db._explain("<my aql query>")
and it didn't shed more light on this.
The AQL query in question is:
FOR v, e, p in 3 OUTBOUND "company/jquery" company_teams, team_contributors, committed OPTIONS {uniqueVertices: "global", bfs: true} FILTER p.vertices[1]._key == "1055031914" AND length(p.vertices[2].parents) < 2 RETURN v._id
The issue can be reproduced using this dataset:
https://drive.google.com/open?id=1VIZFL3vcZTw5q2ur-FzZQNrAa1u1jYXx
These are the steps to reproduce:
Provided dataset has the following structure
company (vertex) -> company_teams (edge) -> team (vertex) -> team_contributors (edge) -> contributor (vertex) -> committed (edge) -> commit (vertex)
For the simplisity, each collection (vertex and edge) has only one record.
Run query #1
FOR v, e, p in 3 OUTBOUND "company/jquery" company_teams, team_contributors, committed OPTIONS {uniqueVertices: "global", bfs: true} FILTER p.vertices[1]._key == "1055031914" RETURN v._id
and see that result has one commit ("commit/1571475"), exactly what I expect
Run query #2
FOR v, e, p in 3 OUTBOUND "company/jquery" company_teams, team_contributors, committed OPTIONS {uniqueVertices: "global", bfs: true} FILTER length(p.vertices[2].parents) < 2 RETURN v._id
and see that result has one commit ("commit/1571475"), again, exactly what I expect
From the queries #1 and #2 I've tried 2 different filters and both returned the commit record.
I assume that 2 filters combined together should give me the same result.
Run query #3
FOR v, e, p in 3 OUTBOUND "company/jquery" company_teams, team_contributors, committed OPTIONS {uniqueVertices: "global", bfs: true} FILTER p.vertices[1]._key == "1055031914" AND length(p.vertices[2].parents) < 2 RETURN v._id
and see that result is empty