Closed gramian closed 1 month ago
Cypher has also a LIMIT
keyword: https://neo4j.com/docs/cypher-manual/current/clauses/limit/
Gremlin will be somewhat harder with the .limit(x)
method: https://kelvinlawrence.net/book/Gremlin-Graph-Guide.html#limit
The limit in the get /query is used to cut the result, not in the query itself. So it should work with any language because it acts when it serializes the resultset. Checking the code, I see the limit is not used only in the graph
serializer that I assume is the one you're using. Fixing it right now.
Your fix seems to work, but is off by one, meaning one element is missing, so a limit of 2 returns only 1 vertex. for limits 2 and 3 only 1 is returned. From limit 4 on it seems to work as expected.
This still seems to work only for SQL and SQLscript. The fix only affects all languages for limits 1,2,3 where only one vertex is returned.
Thanks for the quick fix so far
Not sure to understand if it's fixed or not, but I've pushed another fix that consider the limit also for vertices and edges across all the serializers
Sorry, no it still does not fix it. The problem remains:
sql
and sqlscript
and the limit is greater or equal to four.cypher
, gremlin
, with limit greater or equal than four all vertices are returned.
ArcadeDB Version:
ArcadeDB Server v24.6.1-SNAPSHOT (build d21f2f50234cec7f64bf4ab1a1118b2e76c5f0a8/1721165296536/main)
OS and JDK Version:
Running on Mac OS X 12.7.5 - OpenJDK 64-Bit Server VM 17.0.12 (Homebrew)
Expected behavior
The
limit
property in a query or command request returns the limited amount of items.Actual behavior
The
limit
property seems to work only forSQL
. ForCypher
andGremlin
it fails and returns all query results. I assume it also fails forMQL
andGraphQL
.Steps to reproduce
Prepare dataset in a database
test
:SQL limit works:
Cypher limit fails, returns all vertices:
Gremlin limit fails, returns all vertices: