When I type in incorrect argument type it says “{BAG, BOOL, DATETIME, DOUBLE, EDGE, FILE, FLOAT, INT, JSONARRAY, JSONOBJECT, MAP, SET, STRING, UINT, VERTEX, ‘)’}”. So looks like MAP is one of the valid argument type. But when I added a “test” query mentioned below, I get “Error: An unexpected argument type map<vertex,float>” in console.
Can someone please explain this behavior, why it won’t let me have “MAP” as one of the argument types?
If you really need to pass complicated objects around, then parsing this in and out is the only approach we have right now. This can be a little tedious, but it works well. Let me know if you’d like to know more on that and I’ll see if we can whip up a simple example.
When I type in incorrect type in the arguments, it gives " Error: mismatched input ‘MapAccum’ expecting {BAG, BOOL, DATETIME, DOUBLE, EDGE, FILE, FLOAT, INT, JSONARRAY, JSONOBJECT, MAP, SET, STRING, UINT, VERTEX, ‘)’} " message in the console.
Example code to get the error mentioned above,
CREATE QUERY test(MapAccum<VERTEX, FLOAT> var1) FOR GRAPH g1 {
PRINT “Test Query”;
}