How to pattern match edges in reverse?

29 views
Skip to first unread message

Daniel Solow

unread,
Apr 7, 2020, 9:06:14 AM4/7/20
to gsql-users
The following query works for me:


CREATE QUERY test
(Vertex seed) FOR GRAPH abc SYNTAX v2 {
     
Frontier (ANY) = {seed};


     
Frontier =  SELECT v FROM Frontier:u-((_|_>):e)-ANY:v WHERE true;
   
     
print Frontier;
}

However, this query, with the directionality reversed, does not:

CREATE QUERY test(Vertex seed) FOR GRAPH abc SYNTAX v2 {
     
Frontier (ANY) = {seed};


     
Frontier =  SELECT v FROM Frontier:u-((_|<_):e)-ANY:v WHERE true;
   
     
print Frontier;
}

I get the following error:

line 30:12 extraneous input '.*' expecting '}'
Parsing encountered 1 syntax error(s)


The query test cannot be added!

How should I get this to work?

Thanks

Adil Ainihaer

unread,
Apr 7, 2020, 6:24:47 PM4/7/20
to gsql-users
Hello Daniel.

I can help look into this issue. Before we start, which version of the TigerGraph product are you using?

Thanks,
Adil

Daniel Solow

unread,
Apr 7, 2020, 7:51:03 PM4/7/20
to gsql-users
2.5.3

Adil Ainihaer

unread,
Apr 8, 2020, 9:32:13 PM4/8/20
to gsql-users
Hello Daniel.

For 2.5.3, please change the target type from "ANY" to "_" to maintain the semantics for the given query.
We will fix this issue in our future release.


Thanks,
Adil

On Tuesday, April 7, 2020 at 6:06:14 AM UTC-7, Daniel Solow wrote:

Daniel Solow

unread,
Apr 9, 2020, 2:33:20 PM4/9/20
to gsql-users
Thank you! This has been driving me crazy
Reply all
Reply to author
Forward
0 new messages