You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a graph where 4 nodes (T1 through T4) are connected like this:
[T1] <-(E2)- [T2] <-(E3)- [T3] -(E4)-> [T4]
The goal of my query is:
Given a T1, find the T4 items.
The kind for T1, T2 and T3 are known but the type for T4 is not. For some reason the follwing query does not work (traversing from the left to right: T1 to T2 to T3 to T4).
get T1 where key = "%s"
traverse in:E2:out:T2
traverse in:E3:out:T3
traverse out:E4:in:
end
end
end
Traversing the nodes and edges in reverse works fine (Right to left).
get T4 where key = "%s"
traverse in:E4:out:T3
traverse out:E3:in:T2
traverse out:E2:in:
end
end
end
show 4:n:key
If I instead start on a node for T2, traverse to T1 and check the contstraint, followed by traversing T2 to T3 to T4 works fine.
get T2
traverse out:E2:in:T1 where key = "%s"
end
traverse in:E3:out:T3
traverse out:E4:in:
end
end
Alternative, if a use full wildcards for the second and the third traversal, T4 is returned (plus some extra data...)
get T1 where key = "%s"
traverse in:E2:out:T2
traverse :::
traverse :::
end
end
end
show 4:n:key
I can't see why the first query doesn't work. Given that traversing in the reverse works, suggests that the graph is correct. Any idea what the issue is?
The text was updated successfully, but these errors were encountered:
I am not able to reproduce the issue. I've added a test which attempts to test this scenario (see eql/regression_test.go for "Issue 43").
The result of the query is:
Labels: T1 Key, T1 Name, T2 Key, T2 Name, T3 Key, T3 Name, Key, Kind, Name
Format: auto, auto, auto, auto, auto, auto, auto, auto, auto
Data: 1:n:key, 1:n:name, 2:n:key, 2:n:name, 3:n:key, 3:n:name, 4:n:key, 4:n:kind, 4:n:name
t1, T1 node, t2, T2 node, t3, T3 node, t4, T4, T4 node
I would expect this result. Could you have a look if I made a mistake or if the failing scenario needs some further conditions to show the unexpected result?
Thanks @krotik. The test looks right. I'll see if I can write some code that I can share that replicates the code I have and reproduces the same issue. It may take a few days until I can get to it though.
I have a graph where 4 nodes (T1 through T4) are connected like this:
The goal of my query is:
The kind for T1, T2 and T3 are known but the type for T4 is not. For some reason the follwing query does not work (traversing from the left to right: T1 to T2 to T3 to T4).
Traversing the nodes and edges in reverse works fine (Right to left).
If I instead start on a node for T2, traverse to T1 and check the contstraint, followed by traversing T2 to T3 to T4 works fine.
Alternative, if a use full wildcards for the second and the third traversal, T4 is returned (plus some extra data...)
I can't see why the first query doesn't work. Given that traversing in the reverse works, suggests that the graph is correct. Any idea what the issue is?
The text was updated successfully, but these errors were encountered: