How to send vertex set parameter to a UDF function

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:

  1. What is the difference between the two queries ?
  2. 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

If that worked for your test1, test2 should work too.

Could you check your GSQL_LOG? You can find it by running command gadmin log gsql.

Thanks.