IntelLabs / vdms

VDMS: Your Favorite Visual Data Management System
MIT License
84 stars 31 forks source link

Properties not defined on some entities break a result set #56

Open mwahle opened 5 years ago

mwahle commented 5 years ago

Using search criteria to search for entities where one of them does not have the property we search for gives an error message:

db.query([{'AddEntity': {'class': 'Test', 'properties': {'x': 1}}}])
Out[4]: ([{'AddEntity': {'info': '', 'status': 0}}], [])

db.query([{'AddEntity': {'class': 'Test', 'properties': {'x': 2}}}])
Out[5]: ([{'AddEntity': {'info': '', 'status': 0}}], [])

db.query([{'AddEntity': {'class': 'Test'}}])
Out[6]: ([{'AddEntity': {'info': '', 'status': 0}}], [])

db.query([{"FindEntity": {'class': 'Test', 'constraints': {'x': ['==', 1]}}}])
Out[7]: 
([{'FindEntity': {'info': 'Unknown operation type for query\n',
    'status': -1}}],
[])

Simply listing them does work:

db.query([{"FindEntity": {'class': 'Test', 'results': {'list': ['x']}}}])
Out[12]: 
([{'FindEntity': {'entities': [{'x': 'Missing property'}, {'x': 2}, {'x': 1}],
    'returned': 3,
    'status': 0}}],
[])

but only if the results are not sorted:

db.query([{"FindEntity": {'class': 'Test', 'results': {'list': ['x'], 'sort': 'x'}}}])
Out[14]: 
([{'FailedCommand': 'Transaction',
   'info': 'Failed PMGDTransaction',
   'status': -1}],
[])
luisremis commented 5 years ago

Thanks Manuel, we really appreciate the minimal reproducible example, thanks for detailing it.

Will work on this ASAP.

ifadams commented 3 months ago

@cwlacewe did this ever get resolved? If not, its a reasonable ask.

cwlacewe commented 3 months ago

@cwlacewe did this ever get resolved? If not, its a reasonable ask.

@ifadams from my knowledge, this was not resolved