gregfelice commented on PR #2347: URL: https://github.com/apache/age/pull/2347#issuecomment-3986675121
Addressed all three Copilot suggestions: 1. **Pre-initialize `ExecInitExpr` at plan init** — Added `prop_expr_state` field to `cypher_update_item`, initialized during `begin_cypher_merge()` for both `on_create_set_info` and `on_match_set_info`. `apply_update_list()` uses the pre-initialized state when available, with fallback for plain SET callers. Follows the same pattern as `cypher_target_node` (id_expr_state, prop_expr_state). 2. **Fix misleading comment** — Changed "ON MATCH SET with MERGE after MATCH" to "ON CREATE SET with MERGE after MATCH" for the first-run test. 3. **Add ON MATCH SET test for Case 1 (predecessor path)** — Added a second-run query that triggers `ON MATCH SET` when the path already exists: `MATCH (a) MERGE (a)-[:KNOWS]->(b) ON MATCH SET b.visited = true`. All regression tests pass (`cypher_merge`: ok). -- 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]
