Hello,
i need some help with GSQL query that calls UDF.
I have a UDF that accept the following parameters
inline void callUDF(SetAccum& source_vertices, SetAccum& target_vertices) ;
I’m calling this function from a gsql query.
when Im calling the UDF from test1 query - the UDF prints results
CREATE QUERY test1(set< vertex> startVertices, set < vertex> endVertices) FOR GRAPH test {
callUDF(startVertices, endVertices);
}
and when i call it from test2 query - the UDF prints nothing
CREATE QUERY test2(Vertex startVertices, vertex endVertices) FOR GRAPH test {
SetAccum @@start ;
SetAccum @@endver ;
@@start +=startVertices;
@@endver +=endVertices;
callUDF( @@start, @@endver);
}
I have 2 questions about this issue:
- What is the difference between the two queries ?
- How can i write a query that get a single vertex and call the callUDF() without changing the UDF signature?
in other words, how can i make test2 works?
Thanks in advance!
Lior