{"action":"closed","issue":{"url":"https://api.github.com/repos/neo4j/neo4j/issues/4342","labels_url":"https://api.github.com/repos/neo4j/neo4j/issues/4342/labels{/name}","comments_url":"https://api.github.com/repos/neo4j/neo4j/issues/4342/comments","events_url":"https://api.github.com/repos/neo4j/neo4j/issues/4342/events","html_url":"https://github.com/neo4j/neo4j/issues/4342","id":65432351,"number":4342,"title":"2.2.0 Cypher Bug - Parameterized Legacy Index query with UNION exception","user":{"login":"Deevian","id":1906428,"avatar_url":"https://avatars.githubusercontent.com/u/1906428?v=3","gravatar_id":"","url":"https://api.github.com/users/Deevian","html_url":"https://github.com/Deevian","followers_url":"https://api.github.com/users/Deevian/followers","following_url":"https://api.github.com/users/Deevian/following{/other_user}","gists_url":"https://api.github.com/users/Deevian/gists{/gist_id}","starred_url":"https://api.github.com/users/Deevian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Deevian/subscriptions","organizations_url":"https://api.github.com/users/Deevian/orgs","repos_url":"https://api.github.com/users/Deevian/repos","events_url":"https://api.github.com/users/Deevian/events{/privacy}","received_events_url":"https://api.github.com/users/Deevian/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/neo4j/neo4j/labels/2.2","name":"2.2","color":"bfd4f2"},{"url":"https://api.github.com/repos/neo4j/neo4j/labels/bug","name":"bug","color":"fc2929"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-03-31T11:40:58Z","updated_at":"2015-04-02T05:31:36Z","closed_at":"2015-04-02T05:31:36Z","body":"We've also ran into this issue while trying out 2.2.0, and although somewhat esoteric, it's applicable to some of our queries. Consider this one:\r\n\r\n```\r\nSTART root=node:Person(id='deevian')\r\nRETURN ID(root) as id\r\n\r\nUNION \r\n\r\nSTART root=node:Person(id='retophy')\r\nRETURN ID(root) as id\r\n```\r\nExecuting it, Neo4j returns `key not found: SymbolUse(id@23)`, with a `Neo.DatabaseError.Statement.ExecutionFailure`message.\r\n\r\nThis only occurs if the statements have at least one `UNION`, and if one the parameters (in this case, `id`) is named the same as one of return aliases.\r\n\r\nIt does not occur when executed separately (without the `UNION`), when replacing `(id='deev')` with `('id:deev')`, or when changing the return alias to whatever else.\r\n"}}