arcadedb icon indicating copy to clipboard operation
arcadedb copied to clipboard

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

Open oc007us opened this issue 1 year ago • 1 comments

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 `

oc007us avatar May 17 '24 14:05 oc007us

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.

TimMensch avatar May 20 '24 19:05 TimMensch

This seems fixed by the latest changes.

gramian avatar Oct 28 '25 19:10 gramian