pyArango
pyArango copied to clipboard
Abnormal behavior with AQL queriy
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?
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>
Might be related to https://github.com/ArangoDB-Community/pyArango/commit/ba114bb2c37849a897dcf6e4c74e0f8a1e684e96 ...not sure.
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.