gregfelice commented on PR #2341:
URL: https://github.com/apache/age/pull/2341#issuecomment-4012885552

   Addressed the remaining Copilot suggestions:
   
   1. **Non-constant false predicate for DML predecessor path** — Replaced 
`WHERE true = false` with `random() IS NULL` in the deferred label check. 
`random()` is VOLATILE, so `eval_const_expressions()` cannot fold it into a 
One-Time Filter that would eliminate the DML predecessor scan. The constant 
variant is still used in the early check (no DML predecessor, safe to fold).
   
   2. **Unified `make_false_where_clause(bool volatile_needed)`** — Merged the 
constant and volatile variants into a single parameterized function. Added a 
comment documenting why AGE's existing `add_volatile_wrapper()` can't be reused 
here (it operates post-transform at the Expr level and returns agtype).
   
   3. **DML side-effect regression test** — Added a follow-up query after 
`CREATE ... WITH ... MATCH (p:NonExistentLabel) RETURN p` that verifies the 
CREATE actually executed (`MATCH (a:Person {name: 'Alice'}) RETURN a.name` → 
`"Alice"`).
   
   All regression tests pass (`cypher_match`: 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]

Reply via email to