Skip to content

Indexes can be created on invalid property names #2484

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

Closed
LiorKogan opened this issue Jul 20, 2022 · 1 comment
Closed

Indexes can be created on invalid property names #2484

LiorKogan opened this issue Jul 20, 2022 · 1 comment
Labels

Comments

@LiorKogan
Copy link
Member

LiorKogan commented Jul 20, 2022

RedisGraph 2.8.15

The following invalid query is considered valid:

GRAPH.QUERY g "CREATE INDEX FOR (p:Person) ON (p.m.n, p.p.q)"

Since m.n and p.q are invalid property names, the command should be rejected.
Currently it creates indexes on properties n and q.


The following invalid queries are considered valid as well:

GRAPH.QUERY g "CREATE INDEX FOR (p:Person) ON (a.b)"
GRAPH.QUERY g "CREATE INDEX FOR (p:Person) ON (1.b)"

Currently both create an index on property b.

@nafraf
Copy link
Contributor

nafraf commented Sep 18, 2022

Hi, I started a solution for this issue, I think that this can be divided in two parts.
The first part is to solve the errors that can be detected by the parser, changes that were implemented in PR posted above.

The second part is to solve the case of invalid queries due to the use of undefined variables:

GRAPH.QUERY g "CREATE INDEX FOR (p:Person) ON (a.b)"

The validation of previous case should be done in Redisgraph. This has not been implemented yet.

@AviAvni AviAvni closed this as completed Oct 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants