pyorient
pyorient copied to clipboard
Mysterious Null Record
Hi,
For some reason, querying the $stack context variable of a TRAVERSE triggers a PyOrientNullRecordException, even as running the same command inside OrientDB studio returns lists of strings.
I can reproduce this by changing line 1060 of tests/test_ogm.py (develop
branch) to:
traversals_query = g.query(traversal).what(QV.stack()).filter(QV.depth() > 0)
Which maps to:
SELECT $stack FROM (TRAVERSE in('on_top_of') FROM #17:1) WHERE $depth > 0
Hi @TropicalPenguin ,
i will check the internals of the driver as soon as possible. Are you using Binary or CSV serialization? Can you send me some data/schema on wich i can run the query and reproduce the issue?
Thank you in advance.
This is with CSV serialization.
Can trigger it pretty directly by adding:
import pdb; pdb.set_trace()
g.client.command('SELECT $stack FROM (TRAVERSE in(\'on_top_of\') FROM {}) WHERE $depth > 0'.format(traversals[0]._id))
towards the end of OGMTestTraversals.testTraversals()