Error: unknown function/tuple constructor

Hi, I’m working writing a query (query_main) that is calling a sub query ( query_main_sub(SET<VERTEX>usersSetA, SET<VERTEX>usersSetB) ) in it which expects 2 sets of vertices.

I’m able to call query_main_sub from query_main as long as I perform all the SELECT on user vertices only eg., SELECT s FROM user:s.

But the moment I add a SELECT statement with edge anywhere within the query_main query eg., SELECT s FROM user:s -( _> )- case:t or SELECT s FROM other:s -( _> )- case:t, I get error “Error: unknown function/tuple constructor“

How can I fix or get around this issue?

1 Like

can yo post the entire query, so that I can reproduce?

CREATE QUERY query_main() FOR GRAPH g1 syntax v2 {

FLOAT TEST;

USR = {User.*};
USR = SELECT s FROM USR:s -( _> )- Other:t;
TEST = query_main_sub();

PRINT TEST;

}

CREATE QUERY query_main_sub() FOR GRAPH g1 RETURNS (FLOAT) syntax v2 {
return 5.5;
}

1 Like

@mingxiwu Hey, just wondering if you were able to reproduce this issue?

1 Like

Hello @dhruva.

@mingxiwu and I have looked into this issue and identified the reason. In TigerGraph 2.x, query-calling-query is not supported for v2 syntax. When a query contains only vertex selection, it is treated as a v1 syntax query which supports query-calling-query. The moment an edge selection step is added, it is treated as a v2 syntax query, thus causing the above error to be reported.

2 Likes

@dhruva,

fyi. we have added the query calling query support in our upcoming 3.0 release. So, please stay tuned.

Mingxi

1 Like