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

IF NOT EXISTS doesn't work for EDGE [@out,@in] index #1601

Open
oc007us opened this issue May 17, 2024 · 1 comment
Open

IF NOT EXISTS doesn't work for EDGE [@out,@in] index #1601

oc007us opened this issue May 17, 2024 · 1 comment

Comments

@oc007us
Copy link

oc007us commented May 17, 2024

ArcadeDB Version:

24.4.1

OS and JDK Version:

MacOS and JDK 21

Expected behavior

When creating INDEX on EDGE Type for (@out, @in) with IF NOT EXISTS, and the index already exists the command should be ignored

Actual behavior

When creating INDEX on EDGE Type for (@out,@in) with IF NOT EXISTS when index exists an error occurs. For example, error looks like this: Cannot execute command Found the existent index 'Members[@out,@in]' defined on the properties '[@out, @in]' for type 'Members', where Members is an EDGE type

Steps to reproduce

CREATE EDGE Type Members; CREATE INDEX IF NOT EXISTS ON Members (@out, @in) UNIQUE; CREATE INDEX IF NOT EXISTS ON Members (@out, @in`) UNIQUE;

The second CREATE INDEX command fails
`

@TimMensch
Copy link

Also fails on

CREATE EDGE Type TestEdge;
CREATE INDEX IF NOT EXISTS ON TestEdge (`@out`) UNIQUE;
CREATE INDEX IF NOT EXISTS ON TestEdge (`@out`) UNIQUE;

and

CREATE EDGE Type TestEdge2 IF NOT EXISTS;
CREATE INDEX IF NOT EXISTS ON TestEdge2 (`@in`) UNIQUE;
CREATE INDEX IF NOT EXISTS ON TestEdge2 (`@in`) UNIQUE;

A fix for both @out and @in will probably fix these as well, but I just wanted to be thorough since I ran into the same error separately, and depending on the code it could be a slightly different fix. Couldn't hurt to add to the test cases in any case.

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

No branches or pull requests

2 participants