crprashant commented on PR #2412:
URL: https://github.com/apache/age/pull/2412#issuecomment-4812725955
Thanks @gregfelice — good catch, and you're right on both counts. I traced
it the same way: the CREATE (`cypher_clause.c:7049`) and SET `=`
(`cypher_clause.c:2378`) overrides only set `keep_null = false` on the
top-level property map node and don't recurse, so a nested map value is its own
`cypher_map` node that now inherits the `true` default and preserves its null
keys. Confirmed empirically:
```cypher
CREATE (n {a: {b: null}})
-- before: a -> {}
-- after: a -> {"b": null}
```
Agreed this is the more consistent behaviour, so I've pinned it rather than
suppressed it. Addressed in 71f8d44:
1. **Nested write coverage** — added to the Issue 2391 block in
`expr.sql`/`expr.out`: `CREATE (n:Nested {a: {b: null}}) RETURN n`, `MATCH
(n:Nested) SET n = {a: {b: null}} RETURN n`, and a `MATCH` verify, so the
nested-preserve behaviour can't silently revert.
2. **Wording** — tightened the PR description and the `map:` rule comment in
`cypher_gram.y` from "leaves CREATE / SET behaviour unchanged" to "top-level
CREATE / SET property null-stripping is unchanged", and the comment now notes
nested map values keep the null-preserving default.
On CI: full `make installcheck` against PostgreSQL 18 passes locally (all
tests green, including `age_upgrade`) on the rebased branch. The branch is now
rebased onto current `master`.
--
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]