YGY-001 opened a new issue, #2605:
URL: https://github.com/apache/age/issues/2605

    
   
   ## Environment
   
   - Apache AGE `1.8.0`
   - PostgreSQL `18.6`
   - Docker image: `apache/age:release_PG18_1.8.0`
   - Direct `psql` connection
   
   ## Setup
   
   Run the following in one `psql` session. The two graphs start with identical
   vertices. The whole transaction is rolled back at the end.
   
   ```sql
   CREATE EXTENSION IF NOT EXISTS age;
   LOAD 'age';
   SET search_path = ag_catalog, "$user", public;
   BEGIN;
   
   SELECT ag_catalog.create_graph('age_issue35_left');
   SELECT *
   FROM ag_catalog.cypher('age_issue35_left', $$
     CREATE (n0:T {id: 1, k4: 'x'}), (o:Other {id: 2})
   $$) AS (v agtype);
   
   SELECT ag_catalog.create_graph('age_issue35_right');
   SELECT *
   FROM ag_catalog.cypher('age_issue35_right', $$
     CREATE (n0:T {id: 1, k4: 'x'}), (o:Other {id: 2})
   $$) AS (v agtype);
   
   CREATE FUNCTION pg_temp.noop() RETURNS boolean
   LANGUAGE plpgsql VOLATILE AS $$
   BEGIN
     RETURN true;
   END $$;
   
   CREATE FUNCTION pg_temp.make_test_index() RETURNS boolean
   LANGUAGE plpgsql VOLATILE AS $$
   BEGIN
     EXECUTE 'CREATE INDEX idx_issue35_right ON age_issue35_right."Other" USING 
gin (properties)';
     RETURN true;
   END $$;
   ```
   
   ## Left — no-op barrier
   
   The `CALL` keeps the same query shape as the right side but performs no DDL.
   
   ```sql
   SELECT *
   FROM ag_catalog.cypher('age_issue35_left', $$
     MATCH (n0:T {id: 1})
     CALL pg_temp.noop() YIELD noop AS ignored
     WITH n0
     CREATE (n0)-[r:R {id: 12}]->(n0)
     WITH n0, r
     SET n0.k4 = NULL
     RETURN properties(endNode(r)) AS ep
   $$) AS (ep agtype);
   ```
   
   Expected and actual: `{"id": 1}`.
   
   ## Right — index-creation barrier
   
   The only query change is that the `CALL` creates an index on the separate
   `Other` label table.
   
   ```sql
   SELECT *
   FROM ag_catalog.cypher('age_issue35_right', $$
     MATCH (n0:T {id: 1})
     CALL pg_temp.make_test_index() YIELD make_test_index AS ignored
     WITH n0
     CREATE (n0)-[r:R {id: 12}]->(n0)
     WITH n0, r
     SET n0.k4 = NULL
     RETURN properties(endNode(r)) AS ep
   $$) AS (ep agtype);
   ```
   
   Expected: `{"id": 1}`.
   
   Actual: `{"id": 1, "k4": "x"}`.
   
   The right graph's stored vertex properties contain only `id: 1`:
   
   ```sql
   SELECT *
   FROM ag_catalog.cypher('age_issue35_right', $$
     MATCH (n0:T {id: 1})
     RETURN properties(n0) AS p
   $$) AS (p agtype);
   ```
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to