You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@age.apache.org by "beamrock (via GitHub)" <gi...@apache.org> on 2023/05/24 06:23:36 UTC

[GitHub] [age] beamrock opened a new issue, #945: If an alias is not specified, the count result is incorrect.

beamrock opened a new issue, #945:
URL: https://github.com/apache/age/issues/945

   **Describe the bug**
   If an alias is not specified, the count result is incorrect.
   
   **How are you accessing AGE (Command line, driver, etc.)?**
   - anywhere. I did in Command line.
   
   **What data setup do we need to do?**
   
   SELECT * from cypher('movie_graph', $$
   CREATE (a:Part {part_num: '123'}), 
          (b:Part {part_num: '345'}), 
          (c:Part {part_num: '456'}), 
          (d:Part {part_num: '789'})
   $$) as (a agtype);
   
   
   CREATE (a:Part {part_num: '123'}),
          (b:Part {part_num: '345'}), 
          (c:Part {part_num: '456'}), 
          (d:Part {part_num: '789'}) ;
   
   moviedb=# SELECT * from cypher('movie_graph', $$ match (a:Part) return a $$) as (result agtype);
                                           result                                        
   --------------------------------------------------------------------------------------
    {"id": 1125899906842625, "label": "Part", "properties": {"part_num": "123"}}::vertex
    {"id": 1125899906842626, "label": "Part", "properties": {"part_num": "345"}}::vertex
    {"id": 1125899906842627, "label": "Part", "properties": {"part_num": "456"}}::vertex
    {"id": 1125899906842628, "label": "Part", "properties": {"part_num": "789"}}::vertex
   (4 rows)
   
   
   // When an alias is not specified
   moviedb=# SELECT * from cypher('movie_graph', $$ match (:Part) return count(*) $$) as (result agtype);   
    result 
   --------
    1  <-------- incorrect count result
   (1 row)
   
   // When an alias and a label is specified
   moviedb=# SELECT * from cypher('movie_graph', $$ match (a:Part) return count(*) $$) as (result agtype); 
    result 
   --------
    4
   (1 row)
   
   // When an alias is only specified
   moviedb=# SELECT * from cypher('movie_graph', $$ match (a) return count(*) $$) as (result agtype);     
    result 
   --------
    4
   (1 row)
   
   
   Just so you know, agensgraph and neo4j give accurate results.
   
   **Expected behavior**
   A clear and concise description of what you expected to happen.
   
   neo4j@ldbcgraph> match (:Part) return count(*) ;
   +----------+
   | count(*) |
   +----------+
   | 4        |
   +----------+
   
   sampledb=# match (:Part) return count(*) ;
    count 
   -------
    4


-- 
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-unsubscribe@age.apache.org.apache.org

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


Re: [I] If an alias is not specified, the count result is incorrect. [age]

Posted by "jrgemignani (via GitHub)" <gi...@apache.org>.
jrgemignani commented on issue #945:
URL: https://github.com/apache/age/issues/945#issuecomment-1776280722

   I will have a PR for this tomorrow.


-- 
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-unsubscribe@age.apache.org

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


[GitHub] [age] AbdulSamad4068 commented on issue #945: If an alias is not specified, the count result is incorrect.

Posted by "AbdulSamad4068 (via GitHub)" <gi...@apache.org>.
AbdulSamad4068 commented on issue #945:
URL: https://github.com/apache/age/issues/945#issuecomment-1564149496

   I encountered a similar problem and decided to seek assistance on Stack Overflow. I suggest exploring the various solutions provided there to address the issue.
   [https://stackoverflow.com/questions/76334559/apache-agedb-produces-error-when-order-by-and-return-as-r-is-used-unexpected-be/76334883#76334883](url)


-- 
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-unsubscribe@age.apache.org

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


Re: [I] If an alias is not specified, the count result is incorrect. [age]

Posted by "jrgemignani (via GitHub)" <gi...@apache.org>.
jrgemignani commented on issue #945:
URL: https://github.com/apache/age/issues/945#issuecomment-1783396513

   @beamrock This has been corrected in the master branch. 


-- 
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-unsubscribe@age.apache.org

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


[GitHub] [age] jrgemignani commented on issue #945: If an alias is not specified, the count result is incorrect.

Posted by "jrgemignani (via GitHub)" <gi...@apache.org>.
jrgemignani commented on issue #945:
URL: https://github.com/apache/age/issues/945#issuecomment-1579177610

   This is something that needs to be fixed.


-- 
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-unsubscribe@age.apache.org

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


[GitHub] [age] AbdulSamad4068 commented on issue #945: If an alias is not specified, the count result is incorrect.

Posted by "AbdulSamad4068 (via GitHub)" <gi...@apache.org>.
AbdulSamad4068 commented on issue #945:
URL: https://github.com/apache/age/issues/945#issuecomment-1564157994

   I encountered a similar problem and decided to seek assistance on Stack Overflow. I suggest exploring the various solutions provided there to address the issue.
   https://stackoverflow.com/questions/76334559/apache-agedb-produces-error-when-order-by-and-return-as-r-is-used-unexpected-be/76334883


-- 
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-unsubscribe@age.apache.org

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


Re: [I] If an alias is not specified, the count result is incorrect. [age]

Posted by "jrgemignani (via GitHub)" <gi...@apache.org>.
jrgemignani commented on issue #945:
URL: https://github.com/apache/age/issues/945#issuecomment-1777677416

   PR #1288 has been created to address this.


-- 
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-unsubscribe@age.apache.org

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


Re: [I] If an alias is not specified, the count result is incorrect. [age]

Posted by "jrgemignani (via GitHub)" <gi...@apache.org>.
jrgemignani commented on issue #945:
URL: https://github.com/apache/age/issues/945#issuecomment-1775801131

   I will look at this.


-- 
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-unsubscribe@age.apache.org

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


Re: [I] If an alias is not specified, the count result is incorrect. [age]

Posted by "jrgemignani (via GitHub)" <gi...@apache.org>.
jrgemignani commented on issue #945:
URL: https://github.com/apache/age/issues/945#issuecomment-1773549306

   Verified this is still an issue -
   
   ```
   psql-15.4-5432-pgsql=# SELECT create_graph('movie_graph');
   NOTICE:  graph "movie_graph" has been created
    create_graph
   --------------
   
   (1 row)
   
   psql-15.4-5432-pgsql=# SELECT * from cypher('movie_graph', $$
   psql-15.4-5432-pgsql$# CREATE (a:Part {part_num: '123'}),
   psql-15.4-5432-pgsql$#        (b:Part {part_num: '345'}),
   psql-15.4-5432-pgsql$#        (c:Part {part_num: '456'}),
   psql-15.4-5432-pgsql$#        (d:Part {part_num: '789'})
   psql-15.4-5432-pgsql$# $$) as (a agtype);
    a
   ---
   (0 rows)
   
   psql-15.4-5432-pgsql=# SELECT * from cypher('movie_graph', $$ match (a:Part) return a $$) as (result agtype);
                                          result
   -------------------------------------------------------------------------------------
    {"id": 844424930131969, "label": "Part", "properties": {"part_num": "123"}}::vertex
    {"id": 844424930131970, "label": "Part", "properties": {"part_num": "345"}}::vertex
    {"id": 844424930131971, "label": "Part", "properties": {"part_num": "456"}}::vertex
    {"id": 844424930131972, "label": "Part", "properties": {"part_num": "789"}}::vertex
   (4 rows)
   
   psql-15.4-5432-pgsql=# SELECT * from cypher('movie_graph', $$ match (:Part) return count(*) $$) as (result agtype);
    result
   --------
    1
   (1 row)
   
   psql-15.4-5432-pgsql=# SELECT * from cypher('movie_graph', $$ match (a:Part) return count(*) $$) as (result agtype);
    result
   --------
    4
   (1 row)
   
   psql-15.4-5432-pgsql=#
   ```
   


-- 
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-unsubscribe@age.apache.org

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