-
Notifications
You must be signed in to change notification settings - Fork 869
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
dijkstra throws exception #7818
Comments
Hi @agarciaGIT I just tried it with latest 2.2.29 and it seems to work fine. Could you please try to upgrade and, in case it still fails, post an SQL script to reproduce the problem? Thanks Luigi |
So it seems in a brand new database astar() and dijkstra() are working. But
in my existing database where I have subclasses for E and V and many nodes
they do not. I have put the property 'weight' on the class E itself, no
sure if this is an issue.
If I do ShortestPath I get this:
orientdb {db=SpinOffIntelligence}> SELECT shortestPath(#13:834, #39:27)
+----+-----------------------+
|# |shortestPath |
+----+-----------------------+
|0 |[#13:834,#23:74,#39:27]|
+----+-----------------------+
If I do the other I get this:
orientdb {db=SpinOffIntelligence}> SELECT astar(#13:834, #39:27, 'weight')
+----+-----+
|# |astar|
+----+-----+
|0 |[] |
+----+-----+
orientdb {db=SpinOffIntelligence}> SELECT dijkstra(#13:834, #39:27,
'weight')
+----+--------+
|# |dijkstra|
+----+--------+
|0 |[] |
+----+--------+
In this case it did not throw an exception. I did set weight = 100 for ALL
nodes though.
Question is why do these not return any data now?
Thanks,
AG
…On Thu, Oct 19, 2017 at 11:33 AM, luigidellaquila ***@***.***> wrote:
Hi @agarciaGIT <https://github.com/agarciagit>
I just tried it with latest 2.2.29 and it seems to work fine.
I think this problem was fixed long time ago.
Could you please try to upgrade and, in case it still fails, post an SQL
script to reproduce the problem?
Thanks
Luigi
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#7818 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ACQXMUXE5C1I9SEYhbmzOxGTA4Pe7N-hks5st2vBgaJpZM4P4YU2>
.
|
Hi @agarciaGIT Having the property on E class is definitely OK, that should not be the problem. Thanks Luigi |
Sure here it is.
Thanks!
AG
…On Fri, Oct 27, 2017 at 8:49 AM, luigidellaquila ***@***.***> wrote:
Hi @agarciaGIT <https://github.com/agarciagit>
Having the property on E class is definitely OK, that should not be the
problem.
As the issue is easily reproducible on your DB, but not on other
databases, is there any chance to have your DB (or a DB with the same
issue) so that I can debug it locally?
Thanks
Luigi
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#7818 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ACQXMa_TjIpoglGcw0hYo7_jmlVoCO1iks5swdFmgaJpZM4P4YU2>
.
|
Hi @agarciaGIT I didn't get the attachment (GitHub does not allow to send them via email), could you please link it to the issue? Thanks Luigi |
OK, here. |
Here is a very simple DB with Just E and V where I have size and weight as Integers and astar and dijkstra both choose the more expensive path! orientdb {db=SOI2}> SELECT dijkstra(#9:0, #9:1, size) +----+----------------+ 1 item(s) found. Query executed in 0.002 sec(s). +----+----------------+ |
Hi @agarciaGIT I think I found the problem with the NullPointer, it happens when the source or the destination vertex do not exist. I'm fixing it now.
I tested it locally and it works fine Thanks Luigi |
Hi @agarciaGIT I just pushed a fix for the NPE. Thanks Luigi |
OrientDB Version: 2.2.9
Java Version: 1.8.0_111-b15
OS: Amazon Linux AMI 2016.09
Expected behavior
Running dijkstra will return the cheapest path between two vertices
Actual behavior
The dijkstra(#30:5, #39:3,'weight', 'both') call throws an error Error: java.lang.NullPointerException
Steps to reproduce
I have a simple graph where two vertices are connected by two other vertices via 4 edges forming a diamond. V1 <-E1- VA -E2-> V2 and V1 <-E3- VB -E4-> V2.
The dijkstra(#30:5, #39:3,'weight', 'both') call throws an error Error: java.lang.NullPointerException
The text was updated successfully, but these errors were encountered: