diangamichael commented on issue #1850:
URL: https://github.com/apache/age/issues/1850#issuecomment-2109372679

   I think you should breakdown your complex query into simple blocks then 
execute one by one to isolate the error within the query 
   
   -- Create the extension and graph
   CREATE EXTENSION age;
   SET search_path TO ag_catalog;
   SELECT create_graph('list_comprehension');
   
   -- Test simpler Cypher queries
   -- Step 1: Simple list comprehension
   SELECT * FROM cypher('list_comprehension', $$ WITH [1, 2, 3] AS u RETURN u 
$$) AS (u agtype);
   
   -- Step 2: Unwind a list
   SELECT * FROM cypher('list_comprehension', $$ WITH [1, 2, 3] AS u UNWIND u 
AS v RETURN v $$) AS (v agtype);
   
   If the simplified queries work increase the complexities step by step
   
   -- Step 3: Collect a list
   SELECT * FROM cypher('list_comprehension', $$ WITH [1, 2, 3] AS u UNWIND u 
AS v RETURN collect(v) $$) AS (collected agtype);
   
   -- Step 4: Add matching and setting properties
   SELECT * FROM cypher('list_comprehension', $$ CREATE (n {list: [0, 2, 4, 6, 
8, 10, 12]}) RETURN n $$) AS (n agtype);
   
   SELECT * FROM cypher('list_comprehension', $$ MATCH (n {list: [0, 2, 4, 6, 
8, 10, 12]}) RETURN n $$) AS (n agtype);
   
   SELECT * FROM cypher('list_comprehension', $$ MATCH (n {list: [0, 2, 4, 6, 
8, 10, 12]}) WITH n, collect(n.list) AS v RETURN v $$) AS (v agtype);
    with this you isolate the problematic query and rectify it
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@age.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to