gregfelice commented on PR #2347:
URL: https://github.com/apache/age/pull/2347#issuecomment-4013509439
Addressed the remaining 5 Copilot suggestions:
1. **`ON` as reserved keyword -- backward compatibility** -- Added
regression test confirming `on` works as a label name via the `safe_keywords`
grammar path (`CREATE (n:on {name: 'test'})` succeeds). Note: `on` as a
variable name (`MATCH (on)`) is not supported, which is consistent with all
other reserved keywords (MATCH, CREATE, SET, etc. also cannot be used as
variable names).
2. **`prop_expr` NULL fallback** -- Replaced silent fallback with
`ereport(ERROR)` when `set_tle` is NULL at both ON MATCH SET and ON CREATE SET
resolution sites. Extracted `resolve_merge_set_exprs()` helper to deduplicate
the two identical loops.
3. **Case 1 non-terminal: ExecStoreVirtualTuple** -- Moved
`ExecStoreVirtualTuple` unconditionally after `process_path()`, before the
`on_create_set_info` check. This matches the Case 3 pattern (line 994) and
ensures `tts_nvalid` is set for downstream `ExecProject` even when ON CREATE
SET is absent.
4. **Case 1 terminal: ExecStoreVirtualTuple** -- Same fix applied to the
terminal path.
5. **Duplicate code** -- The two prop_expr resolution loops (ON MATCH SET /
ON CREATE SET) are now a single `resolve_merge_set_exprs()` helper with
parameterized clause name for the error message.
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]