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

   * Bitnine DB Tech Team
   
   **Describe the bug**
   The count number does not match on UPDATE and DELETE.
   In AGE, when performing UPDATE and DELETE operations, even if there are 
changes made to the affected items, they are still indicated as 0.
   
   **How are you accessing AGE (Command line, driver, etc.)?**
   Command line
   
   **What data setup do we need to do?**
   ```pgsql
   ...
   SELECT * from cypher('my_graph_name', $$
     CREATE (a:Part {part_num: '123'}), 
            (b:Part {part_num: '345'}), 
            (c:Part {part_num: '456'}), 
            (d:Part {part_num: '789'})
   $$) as (a agtype);
   ...
   ```
   
   **What is the command that caused the error?**
   1. UPDATE
   ```pgsql
   SELECT * FROM cypher ( 'tmp', $$ 
       MATCH (a:Part) WHERE a.part_num=~'3+' 
       SET a.part_num='333' 
   $$) AS (a agtype) ;
   ```
   Result 
   ```pgsql
    a
   ---
   (0 rows)
   ```
   Check
   ```pgsql
   SELECT * FROM cypher ( 'tmp', $$ 
       MATCH (a:Part) RETURN a 
   $$) AS (a agtype) ;
   ```
   ```pgsql 
                                             a
   
-------------------------------------------------------------------------------------
    {"id": 844424930131971, "label": "Part", "properties": {"part_num": 
"456"}}::vertex
    {"id": 844424930131972, "label": "Part", "properties": {"part_num": 
"789"}}::vertex
    {"id": 844424930131969, "label": "Part", "properties": {"part_num": 
"333"}}::vertex
    {"id": 844424930131970, "label": "Part", "properties": {"part_num": 
"333"}}::vertex
   (4 rows)
   ```
   There are two changed rows.
   
   2. DELETE
   
   Same goes for DELETE.
   ```pgsql
   SELECT * FROM cypher ( 'tmp', $$ 
       MATCH (a:Part) WHERE a.part_num=~'3+' DELETE a 
   $$) AS (a agtype) ;
   ```
   Result
   ```pgsql
    a
   ---
   (0 rows)
   ```
   
   Check
   ```pgsql
   SELECT * FROM cypher ( 'tmp', $$ MATCH (a:Part) return a $$) AS (a agtype) ;
   ```
   ```pgsql
                                             a
   
-------------------------------------------------------------------------------------
    {"id": 844424930131971, "label": "Part", "properties": {"part_num": 
"456"}}::vertex
    {"id": 844424930131972, "label": "Part", "properties": {"part_num": 
"789"}}::vertex
   (2 rows)
   ```
   You can see that the two rows containing the 3 have been deleted.
   However, it shows 0 as the number of deleted rows.
   
   **Expected behavior**
   I want to see the number of changed or deleted rows.
   For comparison, the case of Agensgraph is shown. 
   The test process is the same as above, and the process will be skipped.
   
   Result (UPDATE)
   ```pgsql
   UPDATE 2
   ```
   
   Result (DELETE)
   ```pgsql
   UPDATE 2
   ```
   
   **Environment (please complete the following information):**
   - Version: [e.g. 0.4.0]
   
   **Additional context**
   Add any other context about the problem here.
   


-- 
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.apache.org

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

Reply via email to