{"action":"closed","issue":{"url":"https://api.github.com/repos/orientechnologies/orientdb/issues/6931","repository_url":"https://api.github.com/repos/orientechnologies/orientdb","labels_url":"https://api.github.com/repos/orientechnologies/orientdb/issues/6931/labels{/name}","comments_url":"https://api.github.com/repos/orientechnologies/orientdb/issues/6931/comments","events_url":"https://api.github.com/repos/orientechnologies/orientdb/issues/6931/events","html_url":"https://github.com/orientechnologies/orientdb/issues/6931","id":190394546,"number":6931,"title":"MATCH bug in location existence check","user":{"login":"obi1kenobi","id":2348618,"avatar_url":"https://avatars.githubusercontent.com/u/2348618?v=3","gravatar_id":"","url":"https://api.github.com/users/obi1kenobi","html_url":"https://github.com/obi1kenobi","followers_url":"https://api.github.com/users/obi1kenobi/followers","following_url":"https://api.github.com/users/obi1kenobi/following{/other_user}","gists_url":"https://api.github.com/users/obi1kenobi/gists{/gist_id}","starred_url":"https://api.github.com/users/obi1kenobi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/obi1kenobi/subscriptions","organizations_url":"https://api.github.com/users/obi1kenobi/orgs","repos_url":"https://api.github.com/users/obi1kenobi/repos","events_url":"https://api.github.com/users/obi1kenobi/events{/privacy}","received_events_url":"https://api.github.com/users/obi1kenobi/received_events","type":"User","site_admin":false},"labels":[{"id":197557840,"url":"https://api.github.com/repos/orientechnologies/orientdb/labels/bug","name":"bug","color":"fc2929","default":true}],"state":"closed","locked":false,"assignee":{"login":"luigidellaquila","id":459289,"avatar_url":"https://avatars.githubusercontent.com/u/459289?v=3","gravatar_id":"","url":"https://api.github.com/users/luigidellaquila","html_url":"https://github.com/luigidellaquila","followers_url":"https://api.github.com/users/luigidellaquila/followers","following_url":"https://api.github.com/users/luigidellaquila/following{/other_user}","gists_url":"https://api.github.com/users/luigidellaquila/gists{/gist_id}","starred_url":"https://api.github.com/users/luigidellaquila/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/luigidellaquila/subscriptions","organizations_url":"https://api.github.com/users/luigidellaquila/orgs","repos_url":"https://api.github.com/users/luigidellaquila/repos","events_url":"https://api.github.com/users/luigidellaquila/events{/privacy}","received_events_url":"https://api.github.com/users/luigidellaquila/received_events","type":"User","site_admin":false},"assignees":[{"login":"luigidellaquila","id":459289,"avatar_url":"https://avatars.githubusercontent.com/u/459289?v=3","gravatar_id":"","url":"https://api.github.com/users/luigidellaquila","html_url":"https://github.com/luigidellaquila","followers_url":"https://api.github.com/users/luigidellaquila/followers","following_url":"https://api.github.com/users/luigidellaquila/following{/other_user}","gists_url":"https://api.github.com/users/luigidellaquila/gists{/gist_id}","starred_url":"https://api.github.com/users/luigidellaquila/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/luigidellaquila/subscriptions","organizations_url":"https://api.github.com/users/luigidellaquila/orgs","repos_url":"https://api.github.com/users/luigidellaquila/repos","events_url":"https://api.github.com/users/luigidellaquila/events{/privacy}","received_events_url":"https://api.github.com/users/luigidellaquila/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/orientechnologies/orientdb/milestones/88","html_url":"https://github.com/orientechnologies/orientdb/milestone/88","labels_url":"https://api.github.com/repos/orientechnologies/orientdb/milestones/88/labels","id":1768027,"number":88,"title":"2.2.x (next hotfix)","description":"","creator":{"login":"robfrank","id":413587,"avatar_url":"https://avatars.githubusercontent.com/u/413587?v=3","gravatar_id":"","url":"https://api.github.com/users/robfrank","html_url":"https://github.com/robfrank","followers_url":"https://api.github.com/users/robfrank/followers","following_url":"https://api.github.com/users/robfrank/following{/other_user}","gists_url":"https://api.github.com/users/robfrank/gists{/gist_id}","starred_url":"https://api.github.com/users/robfrank/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robfrank/subscriptions","organizations_url":"https://api.github.com/users/robfrank/orgs","repos_url":"https://api.github.com/users/robfrank/repos","events_url":"https://api.github.com/users/robfrank/events{/privacy}","received_events_url":"https://api.github.com/users/robfrank/received_events","type":"User","site_admin":false},"open_issues":160,"closed_issues":2,"state":"open","created_at":"2016-05-16T08:28:14Z","updated_at":"2016-12-22T15:16:04Z","due_on":null,"closed_at":null},"comments":28,"created_at":"2016-11-18T18:55:05Z","updated_at":"2016-12-22T15:16:04Z","closed_at":"2016-12-22T15:16:04Z","body":"## OrientDB Version, operating system, or hardware.\r\n- v2.0 SNAPSHOT[ ] - .18[ ] .17[ ] .16[ ] .15[ ] .14[ ] .13[ ] .12[ ] .11[ ] .10[ ] .9[ ] .8[ ] .7[ ] .6[ ] .5[ ] .4[ ] .3[ ] .2[ ] .1[ ] .0[ ]\r\n- v2.1 SNAPSHOT[ ] - .16[ ] .15[ ] .14[ ] .13[ ] .12[ ] .11[ ] .10[ ] .9[ ] .8[ ] .7[ ] .6[ ] .5[ ] .4[ ] .3[ ] .2[ ] .1[ ] .0[ ]\r\n- v2.2 SNAPSHOT[ ] - .13[x] .rc1[ ] .beta2[ ] .beta1[ ]\r\n\r\n## Operating System\r\n- [x] Linux\r\n- [x] MacOSX\r\n- [ ] Windows\r\n- [ ] Other Unix\r\n- [ ] Other, name? \r\n\r\n## Expected behavior and actual behavior\r\nExpected: If a traversal location named `baz` exists in the output, then checking `$matched.baz IS null` should be false in the MATCH query.\r\n\r\nActual: See below for an instance where data is returned for a location named `baz`, and yet the query evaluates `$matched.baz IS null` as `true`.\r\n\r\n## Steps to reproduce the problem\r\n### Here's what the formed structure looks like:\r\n```\r\nFoo ==> Bar ==> Baz\r\n  \\\r\n   \\=> Far\r\n```\r\n\r\n### Setup:\r\n```\r\nCREATE CLASS Foo EXTENDS V\r\nCREATE CLASS Bar EXTENDS V\r\nCREATE CLASS Baz EXTENDS V\r\nCREATE CLASS Far EXTENDS V\r\nCREATE CLASS Foo_Bar EXTENDS E\r\nCREATE CLASS Bar_Baz EXTENDS E\r\nCREATE CLASS Foo_Far EXTENDS E\r\n\r\nCREATE VERTEX Foo SET name = 'foo'\r\nCREATE VERTEX Bar SET name = 'bar'\r\nCREATE VERTEX Baz SET name = 'baz'\r\nCREATE VERTEX Far SET name = 'far'\r\n\r\nCREATE EDGE Foo_Bar FROM (SELECT FROM Foo) TO (SELECT FROM Bar)\r\nCREATE EDGE Bar_Baz FROM (SELECT FROM Bar) TO (SELECT FROM Baz)\r\nCREATE EDGE Foo_Far FROM (SELECT FROM Foo) TO (SELECT FROM Far)\r\n```\r\n\r\n### Problematic queries:\r\n- `baz` must always exist because it's not optional\r\n```\r\nMATCH {\r\n    class: Foo,\r\n    as: foo\r\n}.out('Foo_Bar') {\r\n    as: bar\r\n}, {\r\n    class: Bar,\r\n    as: bar\r\n}.out('Bar_Baz') {\r\n    as: baz\r\n}, {\r\n    class: Foo,\r\n    as: foo\r\n}.out('Foo_Far') {\r\n    where: ($matched.baz IS null),\r\n    as: far\r\n}\r\nRETURN $matches\r\n\r\n// returns:\r\n// +----+-----+-----+-----+-----+\r\n// |#   |foo  |bar  |far  |baz  |\r\n// +----+-----+-----+-----+-----+\r\n// |0   |#11:0|#12:0|#14:0|#13:0|\r\n// +----+-----+-----+-----+-----+\r\n// \r\n// Note the existence of a result for \"baz\".\r\n```\r\n\r\n- `baz` might not exist because now it's optional\r\n```\r\nMATCH {\r\n    class: Foo,\r\n    as: foo\r\n}.out('Foo_Bar') {\r\n    as: bar\r\n}, {\r\n    class: Bar,\r\n    as: bar\r\n}.out('Bar_Baz') {\r\n    optional: true,\r\n    as: baz\r\n}, {\r\n    class: Foo,\r\n    as: foo\r\n}.out('Foo_Far') {\r\n    where: ($matched.baz IS null),\r\n    as: far\r\n}\r\nRETURN $matches\r\n\r\n// returns:\r\n// +----+-----+-----+-----+-----+\r\n// |#   |foo  |bar  |far  |baz  |\r\n// +----+-----+-----+-----+-----+\r\n// |0   |#11:0|#12:0|#14:0|#13:0|\r\n// +----+-----+-----+-----+-----+\r\n// \r\n// Note the existence of a result for \"baz\".\r\n```\r\n\r\nThis is extremely frustrating, I was hoping that your tests would have caught and prevented such a simple bug from making it into a release. This entire feature is broken at the moment."}}
{"actor":{"display_login":"robfrank"}}