RahimullahShaheen commented on issue #1030:
URL: https://github.com/apache/age/issues/1030#issuecomment-1634164158

   I suppose the complete query that you have run and has caused the error is 
as below.
   
   ```
   SELECT * FROM cypher('graph', $$
       MATCH ()
       RETURN *                                                                 
 
   $$) AS (v agtype);
   ```
   
   The error is not because of the RETURN clause. It is because of the mismatch 
of number of columns returned by the cypher query `(MATCH())` and the number of 
columns defined in the column definition list `(v agtype)`. The match() clause 
return no column while there is one column defined in column definition list 
`(v agtype)`. There is mismatch of column therefore you have encountered the 
error.
   
   Basically in age there is a function by the name of 
`analyze_cypher_and_coerce` which is responsible for comparing the number of 
columns defined in the column definition list with the number of columns 
returned by the analyzed query. If the number of columns do not match then it 
will throw the error `'row and column definition list do not match'`.
   So according to the cause of the error this error message make sense.
   
   The following query also cause the same error:
   
   ```
   SELECT * FROM cypher('emp_graph', $$
       MATCH (v:employee)
       RETURN v.name                                                            
      
   $$) AS (v agtype, x agtype);
   ```
   Error messages are always generalized.
   
   


-- 
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