Here is the gist of what I’m trying to do, for obvious reasons following query returns an error on Line 4. “Error: Accumulators cannot be attached to the edge variable ‘e’. Thus, reading and writing edge accumulators are not supported.”
I know we can’t attach an accumulator to the edge but is there any alternate approach I can try to get similar results?
CREATE QUERY Temp(SET<VERTEX<User>> users, INT a, INT b) FOR GRAPH social {
1. SumAccum<INT> @testCount;
2. USER_SET = {users};
3. X = SELECT t FROM USER_SET:s -(User_SENT_MESSAGE_TO_User:e)-> :t
4. ACCUM e.@testCount += e.countsByMonths.get(a) + e.countsByMonths.get(b);
5. Y = SELECT s FROM USER_SET:s -(User_SENT_MESSAGE_TO_User:e)-> :t
6. WHERE t IN users AND e.@testCount > 0 ACCUM ...;
}
I’m running into a similar problem now, trying to do a local accumulator attached to the edge, but I can’t find a better way to do it than defining an ArrayList and representing the graph with a matrix