If I execute the following query
SELECT * FROM ag_catalog.cypher('graph', $$
match (p:Project)-[:Has]->(t:Task)-[:AssignedTo]->(u:Person)
with distinct t, {tn: t.name, user: collect(u)} as task
with distinct p, {pn: p.name, task: collect(task)} as project
return project
$$) as (p agtype);
the segmentation fault occurs.
and if I execute this query
SELECT * FROM ag_catalog.cypher('graph', $$
match (p:Project)-[:Has]->(t:Task)-[:AssignedTo]->(u:Person)
with p, t, collect(u) as users
with p, {tn: t.name, users: users} as task
with p, collect(task) as tasks
with {pn: p.name, tasks:tasks} as project
return project
$$) as (p agtype);
the error message "container is not an agtype array" is shown.
run the query and see the result. The above query works fine with neo4j.