Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2.2.0 Cypher Bug - Parameterized Legacy Index query with UNION exception #4342

Closed
Deevian opened this issue Mar 31, 2015 · 3 comments
Closed

Comments

@Deevian
Copy link

Deevian commented Mar 31, 2015

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:

START root=node:Person(id='deevian')
RETURN ID(root) as id

UNION 

START root=node:Person(id='retophy')
RETURN ID(root) as id

Executing it, Neo4j returns key not found: SymbolUse(id@23), with a Neo.DatabaseError.Statement.ExecutionFailuremessage.

This 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.

It 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.

@cleishm
Copy link
Contributor

cleishm commented Mar 31, 2015

Thanks @Deevian! I've verified this issue and passed it along to our team.

systay added a commit that referenced this issue Apr 2, 2015
Fixes #4342 - NameSpacing Identifiers in StartItem which are not in scope
@rheusinkveld
Copy link

The issue still exists in 2.2.2 if you use an index hint on the same property. So using the example above the query below will still result in a key not found: SymbolUse error:

START root=node:Person(id='deevian') USING INDEX node:Person(id)
RETURN ID(root) as id

UNION 

START root=node:Person(id='retophy') USING INDEX node:Person(id)
RETURN ID(root) as id

@jexp
Copy link
Member

jexp commented Jun 11, 2015

but USING INDEX node:Person(id) is for schema indexes not for manual/legacy indexes.

So perhaps the error message should be different, but it is an invalid query in the first place :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants