pyorient icon indicating copy to clipboard operation
pyorient copied to clipboard

Mysterious Null Record

Open TropicalPenguin opened this issue 7 years ago • 2 comments

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

TropicalPenguin avatar May 26 '17 07:05 TropicalPenguin

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.

Ostico avatar Jun 09 '17 10:06 Ostico

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()

TropicalPenguin avatar Jun 09 '17 11:06 TropicalPenguin