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

MATCH query with NOT pattern fails to return unique vertices #1689

Closed
finduspedersen opened this issue Aug 14, 2024 · 2 comments
Closed

MATCH query with NOT pattern fails to return unique vertices #1689

finduspedersen opened this issue Aug 14, 2024 · 2 comments
Assignees
Labels
bug Something isn't working fixed
Milestone

Comments

@finduspedersen
Copy link

ArcadeDB Version:

24.6.1

OS and JDK Version:

Official Docker image

Expected behavior

Should return all three different Person vertices, as the NOT part does not match:

personVertex
{"@Rid":"#59:5","@type":"Person","@cat":"v","role":"child","@out":1,"@in":0}
{"@Rid":"#56:4","@type":"Person","@cat":"v","role":"dad","@out":1,"@in":0}
{"@Rid":"#53:3","@type":"Person","@cat":"v","role":"mom","@out":1,"@in":0}

Actual behavior

Returns only one (seemingly random) of the Person vertices but repeats the same three (equal to the total number of Person vertices) times:

personVertex
{"@Rid":"#65:4","@type":"Person","@cat":"v","role":"child","@out":1,"@in":0}
{"@Rid":"#65:4","@type":"Person","@cat":"v","role":"child","@out":1,"@in":0}
{"@Rid":"#65:4","@type":"Person","@cat":"v","role":"child","@out":1,"@in":0}

Steps to reproduce

CREATE VERTEX TYPE Person IF NOT EXISTS;
CREATE PROPERTY Person.role IF NOT EXISTS STRING;
CREATE VERTEX TYPE House IF NOT EXISTS;
CREATE EDGE TYPE LivesIn IF NOT EXISTS;

DELETE FROM LivesIn;
DELETE FROM Person;
DELETE FROM House;

CREATE VERTEX House;
CREATE VERTEX Person SET role='mom';
CREATE VERTEX Person SET role='dad';
CREATE VERTEX Person SET role='child';
CREATE EDGE LivesIn FROM (SELECT FROM Person) TO (SELECT FROM House);

MATCH {TYPE: Person, AS: personVertex} -LivesIn-> {TYPE: House}
, NOT {AS: personVertex} -DummyEdge-> {TYPE: House}
RETURN personVertex;

@lvca lvca self-assigned this Aug 18, 2024
@lvca lvca added the bug Something isn't working label Aug 18, 2024
@lvca lvca added this to the 24.8.1 milestone Aug 18, 2024
@lvca
Copy link
Contributor

lvca commented Aug 18, 2024

Reproduced. The same issue with OrientDB too.

lvca added a commit that referenced this issue Aug 19, 2024
@lvca lvca added the fixed label Aug 19, 2024
@lvca
Copy link
Contributor

lvca commented Aug 19, 2024

Fixed, thanks for the detailed report.

@lvca lvca closed this as completed Aug 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fixed
Projects
None yet
Development

No branches or pull requests

2 participants