IF NOT EXISTS doesn't work for EDGE [`@out`,`@in`] index
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 `
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.
This seems fixed by the latest changes.