Search code examples
dategraphorientdb

OrientDB: result differs when in Browse or "Send to Graph"


I have the following query:

SELECT from Is_Manager_Of LET $Pers = in.PersNum, $Pers2 = out.PersNum, where $Pers2 = 76786 and valid_to.asDate() >= date("2017-01-01 00:00:00")

When executed in the Browser tab, it returns 6 relations and 7 nodes, which is correct (and all the relations have the property "valid_to" that is indeed posterior to 2017-01-01), but when I just click on the "send to graph" button to see the corresponding graph, the filter on the date stops working and a 7th relation appears between 2 nodes (there are 2 nodes that have 2 relations between each other, only the "valid_to" date changes) with a date before 2017-01-01. How can this be??? Why are the results from the same query different in the Browser tab and in the Graph tab?


Solution

  • In OrientDB V 2.2, the back-end of the graph visualization returns all the vertices involved in the query and all the edges that connect these vertices (regardless of the query itself). I agree with you that it in some cases (like yours) it is not the expected behavior, probably it can be enhanced. Could you please open an issue about this?

    UPDATE: the issue is now fixed on the stable branch, the fix will be released in next few days