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

SQL: "dijkstra" function does not accept documented arguments #1941

Open
gramian opened this issue Jan 31, 2025 · 1 comment
Open

SQL: "dijkstra" function does not accept documented arguments #1941

gramian opened this issue Jan 31, 2025 · 1 comment
Assignees

Comments

@gramian
Copy link
Collaborator

gramian commented Jan 31, 2025

ArcadeDB Version 25.2.1-SNAPSHOT

The dijkstra function does not work as described, for example (SQLscript):

CREATE VERTEX TYPE V;
CREATE EDGE TYPE E;
CREATE PROPERTY E.distance LONG;

LET $src = (INSERT INTO V);
LET $dst = (INSERT INTO V);
CREATE EDGE E FROM $src TO $dst SET distance = 1;
CREATE EDGE E FROM $src TO $dst SET distance = 10;

LET $src = (SELECT FROM V LIMIT 1);
LET $dst = (SELECT FROM V LIMIT 1 SKIP 1);
SELECT dijkstra($src, $dst, 'distance') FROM V;

results in the error:

Error on command execution (PostCommandHandler): class com.arcadedb.graph.ImmutableVertex cannot be cast to class java.lang.String (com.arcadedb.graph.ImmutableVertex is in unnamed module of loader 'app'; java.lang.String is in module java.base of loader 'bootstrap')

Similarly, using instead:

LET $src = (SELECT FROM V LIMIT 1);
LET $dst = (SELECT FROM V LIMIT 1 SKIP 1);
SELECT dijkstra($src.@rid, $dst.@rid, 'distance') FROM V;

results in the error:

Error on command execution (PostCommandHandler): class com.arcadedb.database.RID cannot be cast to class java.lang.String (com.arcadedb.database.RID is in unnamed module of loader 'app'; java.lang.String is in module java.base of loader 'bootstrap')

So it seems the source and destination arguments for the dijkstra function are not parsed correctly.

This issue was reported by the user kyurina on Discord

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