pyArango icon indicating copy to clipboard operation
pyArango copied to clipboard

Abnormal behavior with AQL queriy

Open killerB97 opened this issue 5 years ago • 3 comments

I used a simply AQL query to match documents with a filter, when rawResults is True, I get an infinite return result. What I mean by this is when I try to iterate through the query result I get the relevant documents and infinite empty lists []. Can you help me with this?

killerB97 avatar Aug 12 '19 09:08 killerB97

Seeing this behavior off of master with AQLQuery as well.

>>> for k in db.AQLQuery(query, rawResults=True, batchSize=1):
...   for e in k:
...     print(e)
...
{<single result here>}
<hangs forever>

remingtonc avatar Oct 28 '19 21:10 remingtonc

Might be related to https://github.com/ArangoDB-Community/pyArango/commit/ba114bb2c37849a897dcf6e4c74e0f8a1e684e96 ...not sure.

remingtonc avatar Oct 29 '19 00:10 remingtonc

I was able to pin down the bug and create the pull request. The bug was when getting index out of range exception, the Query object return an empty array instead of updating itself into the next batch. Calling the method nextBatch() will fix this. Thx @kqhuynguyen for debuging this with me.

Hydrugion avatar Feb 27 '20 11:02 Hydrugion