I have an unexpected error in my query
SumAccum @currentSum;
//get vertex resultset and calculate accum
vertexSet = SELECT p
FROM vertex1:p-(edge1>:e)-vertex2:po
ACCUM p.@currentSum +=1;
//put name and calculated sum into temp table
SELECT pSet.name, pSet.@currentSum INTO vertexNames
FROM vertexSet:pSet ;
But the second query shows an error
(10, 27) Error: An undefined variable pSet in current scope
//interesting, the next one works, when I put accum in WHERE
SELECT pSet.name INTO vertexNames
FROM vertexSet:pSet
where pSet.@currentSum >=0 ;
And in documentation it is said that we can refer to the accumulators in sql-like syntax.
https://docs.tigergraph.com/dev/gsql-ref/querying/select-statement#sql-like-select-statement
Thank you