gregfelice commented on PR #2360: URL: https://github.com/apache/age/pull/2360#issuecomment-4596538270
@jrgemignani — folded in the test-coverage follow-up (commit `d372551a`). New cases, all verified against a PG18 build (33/33 `installcheck`): pattern exprs in **list literals**, **map literals**, **function args** (`collect()`/`count()`), **`OPTIONAL MATCH … WHERE`** (null-preserving), and **`EXISTS()` + bare pattern combined** in one predicate. One thing I want to flag rather than bury — the **`RETURN (a:Label)`** case from the review doesn't behave as openCypher's label predicate. On an already-bound variable it's a degenerate `EXISTS` existence check (a matching label is always `true`), and a *non-matching* label hits AGE's pre-existing `"multiple labels for variable"` restriction (errors rather than evaluating `false`). I captured both behaviours in the suite (including the error as expected output) so the current semantics are pinned — but if you'd rather **reject** single-node patterns in expression position than document the degenerate form, say the word and I'll add that instead. Also documented that `count()` over a pattern boolean counts every row (boolean `false` is non-null) — expected SQL aggregate semantics, just noted so the value isn't mistaken for a bug. The **EXISTS-sublink-per-row cost note** I'll do as a separate `apache/age-website` PR so it's discoverable from the Cypher reference, as discussed. -- 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]
